001/*
002 * Copyright 2023 the original author or authors.
003 * <p>
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * <p>
008 * https://www.apache.org/licenses/LICENSE-2.0
009 * <p>
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package de.cuioss.tools.net.ssl;
017
018/**
019 * Identifies the key-Algorithm for KeyMaterial-Holder. In order to provide a
020 * sensible default-set these are taken from keycloak 11.
021 *
022 * @author Oliver Wolff
023 *
024 */
025public enum KeyAlgorithm {
026
027    /** {@code null} value. */
028    UNDEFINED,
029
030    /** A concrete algorithm that is not this enum / list. */
031    OTHER,
032
033    /** https://en.wikipedia.org/wiki/Advanced_Encryption_Standard */
034    AES_128,
035
036    /** https://en.wikipedia.org/wiki/Advanced_Encryption_Standard */
037    AES_192,
038
039    /** https://en.wikipedia.org/wiki/Advanced_Encryption_Standard */
040    AES_256,
041
042    /** https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm */
043    ECDSA_P_256,
044
045    /** https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm */
046    ECDSA_P_384,
047
048    /** https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm */
049    ECDSA_P_521,
050
051    /** https://en.wikipedia.org/wiki/HMAC */
052    HMAC_H_256,
053
054    /** https://en.wikipedia.org/wiki/HMAC */
055    HMAC_H_384,
056
057    /** https://en.wikipedia.org/wiki/HMAC */
058    HMAC_H_512,
059
060    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
061    RSA_RS_256,
062
063    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
064    RSA_RS_384,
065
066    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
067    RSA_RS_512,
068
069    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
070    RSA_PS_256,
071
072    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
073    RSA_PS_384,
074
075    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
076    RSA_PS_512,
077
078    /** https://en.wikipedia.org/wiki/RSA_(cryptosystem) */
079    RSA_2048,
080}