uni.BouncyCastle-JCA.3.1.1.source-code.KeyGenerator.crysl Maven / Gradle / Ivy
SPEC javax.crypto.KeyGenerator
OBJECTS
int keysize;
java.security.spec.AlgorithmParameterSpec params;
javax.crypto.SecretKey key;
java.lang.String algorithm;
java.security.SecureRandom random;
EVENTS
g1: getInstance(algorithm);
g2: getInstance(algorithm, _);
Get := g1 | g2;
i1: init(keysize);
i2: init(keysize, random);
i3: init(params);
i4: init(params, random);
i5: init(random);
Init := i1 | i2 | i3 | i4 | i5;
gk1: key = generateKey();
GenKey := gk1;
ORDER
Get, Init?, GenKey
CONSTRAINTS
algorithm in {"AES", "HmacSHA256", "HmacSHA384", "HmacSHA512", "HMACSHA3-256", "HMACSHA3-384", "HMACSHA3-512",
"Poly1305-AES", "Poly1305-Camellia", "Camellia", "ChaCha",
"ChaCha7539", "Poly1305", "Rijndael", "Salsa20", "Serpent", "Tnepres", "Poly1305-Serpent", "SHACAL-2", "Shacal2",
"Twofish", "Poly1305-Twofish", "XSalsa20"};
algorithm in {"AES", "Poly1305-Camellia", "Camellia", "ChaCha", "Salsa20", "SHACAL-2", "Shacal2",
"Rijndael", "Serpent", "Tnepres", "ChaCha7539", "Poly1305", "Poly1305-Serpent",
"Twofish", "Poly1305-Twofish", "XSalsa20"} => keysize in {128, 192, 256};
REQUIRES
randomized[random];
ENSURES
generatedKey[key, algorithm];
© 2015 - 2025 Weber Informatics LLC | Privacy Policy