public enum SecurityStrength extends Enum<SecurityStrength>
References:
[1] NIST SP800-57 - Part 1, "Recommendation for Key Management", March 2007
[2] ANSI X9.62-2005, "American National Standard for Financial Services - The Elliptic Curve Digital Signature Algorithm (ECDSA)", ASC X9, November 2005.
[3] NIST SP800-90, "Recommendation for Random Number Generators", March 2007
Enum Constant and Description |
---|
S112_BITS
Denotes a security strength of 112 bits.
|
S128_BITS
Denotes a security strength of 128 bits.
|
S192_BITS
Denotes a security strength of 192 bits.
|
S256_BITS
Denotes a security strength of 256 bits.
|
S80_BITS
Denotes a security strength of 80 bits.
|
Modifier and Type | Method and Description |
---|---|
int |
getBits()
Returns the security strength in bits of security.
|
static MessageDigest |
getMessageDigest(SecurityStrength securityStrength)
Returns an message digest instance whose security strength matches the
given security strength (see [1, Table 3] and [2, Table D.1]).
|
static SecureRandom |
getSecureRandom(SecurityStrength securityStrength)
Returns an approved secure random number generator (HASH_DRBG [3]) whose
security strength matches the given key size (see [1, Table 3] and [2,
Table D.1]).
|
static SecurityStrength |
getSecurityStrength(BigInteger order)
Determines the security strength for a given key size as specified by [1,
Table 2].
|
static SecurityStrength |
getSecurityStrength(int keySize)
Determines the security strength for a given key size as specified by [1,
Table 2].
|
static SecurityStrength |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SecurityStrength[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SecurityStrength S80_BITS
public static final SecurityStrength S112_BITS
public static final SecurityStrength S128_BITS
public static final SecurityStrength S192_BITS
public static final SecurityStrength S256_BITS
public static SecurityStrength[] values()
for (SecurityStrength c : SecurityStrength.values()) System.out.println(c);
public static SecurityStrength valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getBits()
public static SecureRandom getSecureRandom(SecurityStrength securityStrength)
securityStrength
- the requested security strengthSecureRandom
instancepublic static MessageDigest getMessageDigest(SecurityStrength securityStrength)
securityStrength
- the requested security strengthMessageDigest
instancepublic static SecurityStrength getSecurityStrength(BigInteger order)
order
- the order of the EC grouppublic static SecurityStrength getSecurityStrength(int keySize)
keySize
- the key size in bitsCopyright © 2011–2022 Stiftung SIC. All rights reserved.