tu.crossing.JavaCryptographicArchitecture.3.1.2.source-code.AlgorithmParameterGenerator.crysl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JavaCryptographicArchitecture
Show all versions of JavaCryptographicArchitecture
JavaCryptographicArchitecture CrySL ruleset
The newest version!
SPEC java.security.AlgorithmParameterGenerator
OBJECTS
java.lang.String algorithm;
java.security.AlgorithmParameters algParams;
java.security.spec.AlgorithmParameterSpec genParamSpec;
java.security.SecureRandom random;
int size;
EVENTS
g1: getInstance(algorithm);
g2: getInstance(algorithm, _);
Get := g1 | g2;
i1: init(size);
i2: init(size, random);
i3: init(genParamSpec);
i4: init(genParamSpec, random);
Init := i1 | i2 | i3 | i4;
gp1: algParams = generateParameters();
GenParam := gp1;
ORDER
Get, Init, GenParam
CONSTRAINTS
algorithm in {"AES", "Camellia", "Shacal2", "Shacal-2", "DH", "DiffieHellman", "DSA", "ElGamal"};
algorithm in {"DH", "DiffieHellman", "DSA", "ElGamal"} => size in {3072};
algorithm in {"AES", "Camellia", "Shacal2", "Shacal-2" } => size in {128, 192, 256};
REQUIRES
randomized[random];
ENSURES
preparedAlg[algParams, algorithm] after GenParam;