All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hierynomus.sshj.transport.kex.ExtendedDHGroups Maven / Gradle / Ivy

There is a newer version: 0.39.0
Show newest version
/*
 * Copyright (C)2009 - SSHJ Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hierynomus.sshj.transport.kex;

import net.schmizz.sshj.transport.digest.SHA256;
import net.schmizz.sshj.transport.digest.SHA384;
import net.schmizz.sshj.transport.digest.SHA512;

import static net.schmizz.sshj.transport.kex.DHGroupData.*;

/**
 * Set of KEX methods that are not in official RFCs but are supported by some SSH servers.
 */
@SuppressWarnings("PMD.MethodNamingConventions")
public class ExtendedDHGroups {
    public static DHGroups.Factory Group14SHA256AtSSH() {
        return new DHGroups.Factory("[email protected]", P14, G, new SHA256.Factory());
    }

    public static DHGroups.Factory Group15SHA256() {
        return new DHGroups.Factory("diffie-hellman-group15-sha256", P15, G, new SHA256.Factory());
    }

    public static DHGroups.Factory Group15SHA256AtSSH() {
        return new DHGroups.Factory("[email protected]", P15, G, new SHA256.Factory());
    }

    public static DHGroups.Factory Group15SHA384AtSSH() {
        return new DHGroups.Factory("[email protected]", P15, G, new SHA384.Factory());
    }

    public static DHGroups.Factory Group16SHA256() {
        return new DHGroups.Factory("diffie-hellman-group16-sha256", P16, G, new SHA256.Factory());
    }

    public static DHGroups.Factory Group16SHA384AtSSH() {
        return new DHGroups.Factory("[email protected]", P16, G, new SHA384.Factory());
    }

    public static DHGroups.Factory Group16SHA512AtSSH() {
        return new DHGroups.Factory("[email protected]", P16, G, new SHA512.Factory());
    }

    public static DHGroups.Factory Group18SHA512AtSSH() {
        return new DHGroups.Factory("[email protected]", P18, G, new SHA512.Factory());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy