Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required predicates with this #158

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion BouncyCastle-JCA/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<artifactId>BouncyCastle-JCA</artifactId>
<version>3.0.2</version>
<name>CrySL Rules Bundle</name>

<licenses>
<license>
<name>Eclipse Public License - v2.0</name>
Expand Down
8 changes: 5 additions & 3 deletions BouncyCastle-JCA/src/Key.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ SPEC java.security.Key

OBJECTS
byte[] keyMaterial;

EVENTS
ge1: keyMaterial = getEncoded();
GetEnc := ge1;

ORDER
GetEnc*

REQUIRES
generatedKey[this, _] || generatedPubkey[this] || generatedPrivkey[this];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;

3 changes: 2 additions & 1 deletion BouncyCastle-JCA/src/KeyPair.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ ORDER
REQUIRES
generatedPrivkey[privateKey];
generatedPubkey[publicKey];
noCallTo[Con] => generatedKeypair[this, _];

ENSURES
generatedKeypair[this, _] after Con;
generatedPubkey[retPublicKey] after GetPubl;
generatedPrivkey[retPrivateKey] after GetPriv;
generatedPrivkey[retPrivateKey] after GetPriv;
3 changes: 3 additions & 0 deletions BouncyCastle-JCA/src/PrivateKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ EVENTS

ORDER
GetEnc*

REQUIRES
generatedPrivkey[this];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
3 changes: 3 additions & 0 deletions BouncyCastle-JCA/src/PublicKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ EVENTS

ORDER
GetEnc*

REQUIRES
generatedPubkey[this];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
5 changes: 3 additions & 2 deletions BouncyCastle-JCA/src/SecretKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ EVENTS

ORDER
GetEnc*, Destroy?

REQUIRES
generatedKey[this, _];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;

NEGATES
generatedKey[this, _] after Destroy;


1 change: 0 additions & 1 deletion JavaCryptographicArchitecture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<artifactId>JavaCryptographicArchitecture</artifactId>
<version>3.0.2</version>
<name>CrySL Rules Bundle</name>

<licenses>
<license>
<name>Eclipse Public License - v2.0</name>
Expand Down
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/Key.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ EVENTS

ORDER
GetEnc*

REQUIRES
generatedKey[this, _] || generatedPubkey[this] || generatedPrivkey[this];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
1 change: 1 addition & 0 deletions JavaCryptographicArchitecture/src/KeyPair.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ORDER
REQUIRES
generatedPrivkey[privateKey];
generatedPubkey[publicKey];
noCallTo[Con] => generatedKeypair[this, _];

ENSURES
generatedKeypair[this, _] after Con;
Expand Down
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/PrivateKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ EVENTS

ORDER
GetEnc*

REQUIRES
generatedPrivkey[this];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/PublicKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ EVENTS

ORDER
GetEnc*

REQUIRES
generatedPubkey[this];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/SecretKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ EVENTS

ORDER
GetEnc*, Destroy?

REQUIRES
generatedKey[this, _];

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
Expand Down
Loading