uni.BouncyCastle-JCA.3.0.1.source-code.Signature.crysl Maven / Gradle / Ivy
SPEC java.security.Signature
OBJECTS
byte[] sign;
byte inputByte;
byte[] input;
byte[] output;
java.nio.ByteBuffer inputByteBuffer;
java.lang.String algorithm;
java.security.PrivateKey privateKey;
java.security.PublicKey publicKey;
java.security.cert.Certificate cert;
java.security.spec.AlgorithmParameterSpec params;
boolean verified;
int offset;
int len;
EVENTS
g1: getInstance(algorithm);
g2: getInstance(algorithm, _);
Get := g1 | g2;
i1: initSign(privateKey);
i2: initSign(privateKey, _);
i3: initVerify(cert);
i4: initVerify(publicKey);
InitSign := i1 | i2;
InitVerify := i3 | i4;
u1: update(input);
u2: update(inputByte);
u3: update(input, offset, len);
u4: update(inputByteBuffer);
Update := u1 | u2 | u3 | u4;
s1: output = sign();
s2: sign(output, offset, len);
Sign := s1 | s2;
v1: verified = verify(sign);
v2: verified = verify(sign, offset, len);
Verify := v1 | v2;
ORDER
Get, ((InitSign+, (Update+, Sign+)+ )+ | (InitVerify+, (Update*, Verify+)+ )+ )
CONSTRAINTS
algorithm in {"ECDDSA", "SHA256WITHECDDSA", "SHA384WITHECDDSA", "SHA512WITHECDDSA", "SHA3-256WITHECDDSA", "SHA3-384WITHECDDSA",
"SHA3-512WITHECDDSA", "SHA256WITHECNR", "SHA384WITHECNR", "SHA512WITHECNR", "SHA256withECDSA", "SHA256withDSA",
"SHA384withRSA", "SHA512withRSA", "SHA256withRSA", "SHA384withDSA", "SHA512withDSA",
"QTESLA"};
length[input] >= offset + len;
offset >= 0;
len > 0;
REQUIRES
generatedPrivkey[privateKey];
generatedPubkey[publicKey];
ENSURES
signed[output, inputByte] after Sign;
signed[output, input] after Sign;
signed[output, inputByteBuffer] after Sign;
verified[verified, sign] after Verify;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy