|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectds.ov2.util.Security_parameter
public class Security_parameter
Security estimates for RSA keys and exponent length choice. Based on the estimations of Lenstra in his article "Key length" in the Handbook of Information Security, this class can estimate the security level of an RSA key size in a given year and select a suitable exponent length that achieves the same security level for the descrete logarithm problem.
Static class.
Nested Class Summary | |
---|---|
static class |
Security_parameter.Calibration
Record containing the necessary data for calibrating the machinery for estimating the security parameters. |
Field Summary | |
---|---|
private static double |
one_third
Constant 1/3 with value 0.3333333333333333 |
static Security_parameter.Calibration |
rsa_2004_estimation
Calibration data from Lenstra's "Key length" article. |
static Security_parameter.Calibration |
rsa_768_break_2009
Calibration from the RSA 768 factorization in 2009. |
private static double |
rsa_alpha
An RSA related constant in the estimations of Lenstra. |
Constructor Summary | |
---|---|
protected |
Security_parameter()
Static class, object creation disabled. |
Method Summary | |
---|---|
static int |
exponent_length_for_modulus_length_full_byte(int year,
int modulus_length,
Security_parameter.Calibration cal)
Same as exponent_length_for_modulus_length but round the exponent
length up to the next multiple of 8. |
static int |
exponent_length_for_modulus_length(int year,
int modulus_length,
Security_parameter.Calibration cal)
Compute an exponent length for an RSA key length suitable up to year year . |
(package private) static double |
L(int log_2_n,
double r,
double alpha)
The L function to describe the subexponential complexity of number factoring. |
static double |
rsa_cost(int year,
int modulus_length,
Security_parameter.Calibration cal)
Cost in dollar days that is needed to break an RSA key of size modulus_length in the year year . |
static double |
rsa_level(int year,
int modulus_length,
Security_parameter.Calibration cal)
Security level an RSA key length provides in a given year. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Security_parameter.Calibration rsa_2004_estimation
From this data the security level is estimated as follows. In 1982 40 Million dollar days correspond to security level 56 (DES). With Moores law the same effort corresponds to security level 70.6 in 2004. Therefore an 1024 bit key had security level 74 in 2004.
public static Security_parameter.Calibration rsa_768_break_2009
The key was broken in 2009 with quite some effort, so I assume that 768 bit keys were secure until 2008, ie, the key had security level 73 in 2008. Because of the double Moores-law effect the factorization would have cost about 200 Million dollar days in 2008.
private static final double one_third
private static final double rsa_alpha
Constructor Detail |
---|
protected Security_parameter()
Method Detail |
---|
static double L(int log_2_n, double r, double alpha)
log_2_n
- key lengthr
- distribution between polynomial and exponential parts,
r = 0 gives polynomial complexity, r = 1 exponential
complexity.alpha
- some factor
log_2_n
bits.public static double rsa_cost(int year, int modulus_length, Security_parameter.Calibration cal)
modulus_length
in the year year
. The estimation
is based on a calibraion record and the following:
year
- year for which the cost should be estimatedmodulus_length
- the bit length of the RSA moduluscal
- Calibration data, if null rsa_2004_estimation
is used
public static double rsa_level(int year, int modulus_length, Security_parameter.Calibration cal)
year
- year for which the security level should be estimatedmodulus_length
- the bit length of the RSA moduluscal
- Calibration data, if null rsa_2004_estimation
is used
public static int exponent_length_for_modulus_length(int year, int modulus_length, Security_parameter.Calibration cal)
year
. Based on the
estimated security level (compare rsa_level
)
an exponent length is chosen that provides the same security.
For the exponent length we assume that an exponent of length 2n
privides n bits of security against solving the discrete
logarithm problem.
For a fixed RSA key length the returned exponent length decreases with time because of the assumed advances in number crunching.
The estimations of Lenstra on which the computations are bases are certainly only valid for a relatively narrow range of the arguments. For key length below 512 bits the results are probably only good for amusement. Nevertheless this is the main method to choose exponent length' for key sizes from 32-2048 bits. Simply because there is no sensible way to choose an exponent length.
For very small RSA key sizes the estimated security level becomes negative (not sure what that means). As minimal exponent length 2 is returned in such cases.
year
- year for which the cost should be estimatedmodulus_length
- the bit length of the RSA moduluscal
- Calibration data, if null rsa_2004_estimation
is used
public static int exponent_length_for_modulus_length_full_byte(int year, int modulus_length, Security_parameter.Calibration cal)
exponent_length_for_modulus_length
but round the exponent
length up to the next multiple of 8.
year
- year for which the cost should be estimatedmodulus_length
- the bit length of the RSA moduluscal
- Calibration data, if null rsa_2004_estimation
is used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |