Skip to content

Commit

Permalink
Merge pull request #158 from CROSSINGTUD/feature/required_predicates_…
Browse files Browse the repository at this point in the history
…with_this

Required predicates with this
  • Loading branch information
schlichtig authored Feb 5, 2024
2 parents fb3627e + 85f27e7 commit 8713ba8
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 8 deletions.
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

0 comments on commit 8713ba8

Please sign in to comment.