Skip to content

Commit

Permalink
Merge pull request #148 from CROSSINGTUD/updated_rules
Browse files Browse the repository at this point in the history
Update JCA and BC-JCA rules
  • Loading branch information
schlichtig authored Nov 24, 2023
2 parents 0a36397 + 00bf449 commit fa8bc9e
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions BouncyCastle-JCA/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on -->
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.77</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion BouncyCastle-JCA/src/AlgorithmParameterGenerator.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ORDER

CONSTRAINTS
algorithm in {"AES", "Camellia", "Shacal2", "Shacal-2", "DH", "DiffieHellman", "DSA", "ElGamal"};
algorithm in {"DH", "DSA", "ElGamal"} => size in {1048};
algorithm in {"DH", "DiffieHellman", "DSA", "ElGamal"} => size in {3072};
algorithm in {"AES", "Camellia", "Shacal2", "Shacal-2" } => size in {128, 192, 256};

REQUIRES
Expand Down
2 changes: 1 addition & 1 deletion BouncyCastle-JCA/src/Cipher.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ CONSTRAINTS
cipherTextOffset >= 0;

REQUIRES
generatedKey[key, alg(transformation)];
generatedKey[key, alg(transformation)] || generatedPubkey[key] || generatedPrivkey[key];
randomized[random];
preparedAlg[params, alg(transformation)];
!macced[this, plainText];
Expand Down
2 changes: 1 addition & 1 deletion BouncyCastle-JCA/src/Mac.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EVENTS
Final := FinalWU | FinalWOU;

ORDER
Get, Init, (FinalWU | (Update+, Final))
Get, Init, (FinalWU | (Update+, Final))+

CONSTRAINTS
algorithm in {"AESCMAC", "AESCCMMAC", "HmacSHA256", "HmacSHA384", "HmacSHA512",
Expand Down
6 changes: 3 additions & 3 deletions BouncyCastle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on -->
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.77</version>
</dependency>
</dependencies>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ ORDER
Get, Init, GenParam

CONSTRAINTS
algorithm in {"DH", "DiffieHellman", "DSA"};
size in {2048, 3072};
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];
Expand Down
2 changes: 1 addition & 1 deletion JavaCryptographicArchitecture/src/Cipher.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ CONSTRAINTS
cipherTextOffset >= 0;

REQUIRES
generatedKey[key, alg(transformation)];
generatedKey[key, alg(transformation)] || generatedPubkey[key] || generatedPrivkey[key];
randomized[random];
preparedAlg[params, alg(transformation)];
!macced[this, plainText];
Expand Down
2 changes: 1 addition & 1 deletion JavaCryptographicArchitecture/src/Mac.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EVENTS
Final := FinalWU | FinalWOU;

ORDER
Get, Init, (FinalWU | (Update+, Final))
Get, Init, (FinalWU | (Update+, Final))+

CONSTRAINTS
algorithm in {"HmacSHA256", "HmacSHA384", "HmacSHA512", "HmacPBESHA1", "PBEWithHmacSHA1", "PBEWithHmacSHA224", "PBEWithHmacSHA256", "PBEWithHmacSHA384", "PBEWithHmacSHA512"};
Expand Down

0 comments on commit fa8bc9e

Please sign in to comment.