Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ REQUIRES

ENSURES
preparedAlg[algParams, algorithm] after GenParam;

WEAKNESSES
CWE-326;
CWE-327;
CWE-329;
CWE-330;
6 changes: 6 additions & 0 deletions JavaCryptographicArchitecture/src/AlgorithmParameters.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ REQUIRES
ENSURES
preparedAlg[this, algorithm] after Init;
preparedAlg[encParams, algorithm] after GetEncoded;

WEAKNESSES
CWE-325;
CWE-326;
CWE-330;
CWE-916;
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ REQUIRES

ENSURES
generatedManagerFactoryParameters[this];

WEAKNESSES
CWE-295;
CWE-330;
CWE-347;
5 changes: 5 additions & 0 deletions JavaCryptographicArchitecture/src/CertificateFactory.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ CONSTRAINTS

ENSURES
generatedCert[type];

WEAKNESSES
CWE-295;
CWE-693;
CWE-347;
14 changes: 14 additions & 0 deletions JavaCryptographicArchitecture/src/Cipher.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ EVENTS
wkb1: wrappedKeyBytes = wrap(wrappedKey);
WKB := wkb1;

iv1: getIV();
IV := iv1;

ORDER
Get, Init+, AADUpdate*, WKB+ | (FINWOU | (Update+, DoFinal))+

Expand Down Expand Up @@ -106,6 +109,8 @@ CONSTRAINTS
alg(transformation) in {"AES"} && mode(transformation) in {"GCM", "CTR", "CTS", "CFB", "OFB"} => pad(transformation) in {"NoPadding"};

mode(transformation) in {"CTR", "CTS", "CFB", "OFB"} && encmode != 1 => noCallTo[IWOIV];
mode(transformation) in {"CTR", "CTS", "CFB", "OFB"} && encmode == 1 => callTo[IV];

mode(transformation) in {"CTR", "CTS", "CFB", "ECB", "OFB"} => noCallTo[AADUpdate];


Expand Down Expand Up @@ -137,3 +142,12 @@ ENSURES
encrypted[cipherText, plainText];
encrypted[cipherTextByteBuffer, plainTextByteBuffer];
wrappedKey[wrappedKeyBytes, wrappedKey];

WEAKNESSES
CWE-1240;
CWE-327;
CWE-329;
CWE-330;
CWE-335;
CWE-338;
CWE-780;
8 changes: 8 additions & 0 deletions JavaCryptographicArchitecture/src/CipherInputStream.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ REQUIRES

ENSURES
cipheredInputStream[inputStream, cipher];

WEAKNESSES
CWE-20;
CWE-284;
CWE-326;
CWE-404;
CWE-617;
CWE-665;
5 changes: 5 additions & 0 deletions JavaCryptographicArchitecture/src/CipherOutputStream.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ REQUIRES

ENSURES
cipheredOutputStream[outputStream, cipher];

WEAKNESSES
CWE-404;
CWE-665;
CWE-704;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/Cookie.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ CONSTRAINTS

ENSURES
generatedCookie[this];

WEAKNESSES
CWE-614;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/DHGenParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ CONSTRAINTS

ENSURES
preparedDH[this];

WEAKNESSES
CWE-326;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/DHParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ CONSTRAINTS

ENSURES
preparedDH[this];

WEAKNESSES
CWE-326;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/DSAGenParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ CONSTRAINTS

ENSURES
preparedDSA[this];

WEAKNESSES
CWE-326;
CWE-327;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/DSAParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ CONSTRAINTS

ENSURES
preparedDSA[this];

WEAKNESSES
CWE-326;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/DigestInputStream.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ REQUIRES

ENSURES
digestedInputStream[stream, digest];

WEAKNESSES
CWE-325;
CWE-665;
5 changes: 5 additions & 0 deletions JavaCryptographicArchitecture/src/DigestOutputStream.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ REQUIRES

ENSURES
digestedOutputStream[stream, digest];

WEAKNESSES
CWE-1284;
CWE-305;
CWE-345;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/ECGenParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ CONSTRAINTS

ENSURES
preparedEC[this];

WEAKNESSES
CWE-327;
CWE-326;
5 changes: 5 additions & 0 deletions JavaCryptographicArchitecture/src/ECParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ ORDER

ENSURES
preparedEC[this];

WEAKNESSES
CWE-1240;
CWE-326;
CWE-327;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/GCMParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ REQUIRES

ENSURES
preparedGCM[this];

WEAKNESSES
CWE-323
CWE-330;
6 changes: 6 additions & 0 deletions JavaCryptographicArchitecture/src/HMACParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ ORDER

ENSURES
preparedHMAC[this];

WEAKNESSES
CWE-325;
CWE-326;
CWE-327;
CWE-328;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/IvParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ REQUIRES

ENSURES
preparedIV[this];
WEAKNESSES
CWE-330;
CWE-323;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/Key.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ REQUIRES

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;

WEAKNESSES
CWE-200;
7 changes: 7 additions & 0 deletions JavaCryptographicArchitecture/src/KeyAgreement.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ REQUIRES

ENSURES
preparedKeyMaterial[sharedSecretBuffer] after GenSecretBuffer;

WEAKNESSES
CWE-320;
CWE-325;
CWE-327;
CWE-330;
CWE-338;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/KeyFactory.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ ENSURES
generatedKeyFactory[this, algorithm] after Get;
generatedPrivkey[privateKey] after GenPriv;
generatedPubkey[publicKey] after GenPubl;

WEAKNESSES
CWE-327;
CWE-326;
5 changes: 5 additions & 0 deletions JavaCryptographicArchitecture/src/KeyGenerator.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ REQUIRES

ENSURES
generatedKey[key, algorithm];

WEAKNESSES
CWE-326;
CWE-327;
CWE-330;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/KeyManagerFactory.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ REQUIRES
ENSURES
generatedKeyManager[this] after Init;
generatedKeyManagers[keyManager] after GetKeyMng;

WEAKNESSES
CWE-259;
CWE-316;
10 changes: 10 additions & 0 deletions JavaCryptographicArchitecture/src/KeyPair.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,13 @@ ENSURES
generatedKeypair[this, _] after Con;
generatedPubkey[retPublicKey] after GetPubl;
generatedPrivkey[retPrivateKey] after GetPriv;

WEAKNESSES
CWE-320;
CWE-321;
CWE-330;
CWE-331;
CWE-338;
CWE-325;
CWE-326;

5 changes: 5 additions & 0 deletions JavaCryptographicArchitecture/src/KeyPairGenerator.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ REQUIRES

ENSURES
generatedKeypair[keyPair, algorithm];

WEAKNESSES
CWE-326;
CWE-330;
CWE-338;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/KeyStore.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ ENSURES
generatedKey[key, _];
generatedPrivkey[key];
generatedPubkey[key];

WEAKNESSES
CWE-259;
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ ORDER

ENSURES
generatedManagerFactoryParameters[this];

WEAKNESSES
CWE-295;
CWE-259;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/MGF1ParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ CONSTRAINTS

ENSURES
preparedMGF1[this, mdName];

WEAKNESSES
CWE-327;
CWE-328;
8 changes: 8 additions & 0 deletions JavaCryptographicArchitecture/src/Mac.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ ENSURES
macced[output1, inputByte];
macced[output1, preInput];
macced[output2, input];

WEAKNESSES
CWE-320;
CWE-325;
CWE-328;
CWE-330;
CWE-916;
CWE-327;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/MessageDigest.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ ENSURES
generatedMessageDigest[this] after Get;
digested[output, _];
digested[output, input];

WEAKNESSES
CWE-327;
4 changes: 4 additions & 0 deletions JavaCryptographicArchitecture/src/OAEPParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ REQUIRES

ENSURES
preparedOAEP[this];

WEAKNESSES
CWE-327;
CWE-328;
10 changes: 10 additions & 0 deletions JavaCryptographicArchitecture/src/PBEKeySpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ ENSURES

NEGATES
speccedKey[this, _] after ClearPass;

WEAKNESSES
CWE-259;
CWE-326;
CWE-330;
CWE-760;
CWE-916;
CWE-760;
CWE-750;
CWE-226;
6 changes: 6 additions & 0 deletions JavaCryptographicArchitecture/src/PBEParameterSpec.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ REQUIRES

ENSURES
preparedPBE[this];

WEAKNESSES
CWE-330;
CWE-916;
CWE-331;
CWE-760;
3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/PKIXBuilderParameters.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ REQUIRES

ENSURES
generatedCertPathParameters[this];
WEAKNESSES
CWE-295;

3 changes: 3 additions & 0 deletions JavaCryptographicArchitecture/src/PKIXParameters.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ REQUIRES

ENSURES
generatedCertPathParameters[this];

WEAKNESSES
CWE-295;
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ CONSTRAINTS

ENSURES
generatedPasswordAuthentication[this];

WEAKNESSES
CWE-259;
CWE-798;
7 changes: 7 additions & 0 deletions JavaCryptographicArchitecture/src/PrivateKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ REQUIRES

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;

WEAKNESSES
CWE-312;
CWE-319;
CWE-320;
CWE-321;
CWE-326;
6 changes: 6 additions & 0 deletions JavaCryptographicArchitecture/src/PublicKey.crysl
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ REQUIRES

ENSURES
preparedKeyMaterial[keyMaterial] after GetEnc;
WEAKNESSES
CWE-295;
CWE-347;
CWE-326;
CWE-328;
CWE-345;
Loading
Loading