From ec6db5fd5b17bf395ecb76cab98dff08eb3b0170 Mon Sep 17 00:00:00 2001 From: Hugo Queinnec <67365803+hugoqnc@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:45:32 +0200 Subject: [PATCH] Final BouncyCastle translation and cleaning (#150) * Use encapsulation or decapsulation functionality for the translation of KEM Signed-off-by: Hugo Queinnec * Remove deprecated parts of BouncyCastleInfoMap Signed-off-by: Hugo Queinnec * fix xBcDerivationFunction Signed-off-by: Hugo Queinnec * ECNR Signed-off-by: Hugo Queinnec * ongoing model javadoc Signed-off-by: Hugo Queinnec * ongoing model javadoc Signed-off-by: Hugo Queinnec * add remaining empty javadoc Signed-off-by: Hugo Queinnec * remove deprecated TODOs Signed-off-by: Hugo Queinnec * todo Signed-off-by: Hugo Queinnec --------- Signed-off-by: Hugo Queinnec --- .../bc/BouncyCastleDetectionRules.java | 1 - .../detection/bc/BouncyCastleInfoMap.java | 71 +--------- .../bc/aeadcipher/BcOCBBlockCipher.java | 2 - .../bc/blockcipher/BcBlockCipher.java | 3 +- .../BcBufferedBlockCipher.java | 3 +- .../bc/cipherparameters/BcGMSSParameters.java | 2 - .../cipherparameters/BcSABERParameters.java | 5 - .../BcDerivationFunction.java | 3 - .../plugin/rules/detection/bc/dsa/BcDSA.java | 2 - .../plugin/rules/detection/bc/mac/BcMac.java | 2 - .../detection/bc/other/BcIESEngineInit.java | 2 - .../detection/bc/signer/BcPQCSigner.java | 1 - .../detection/bc/signer/BcSimpleSigner.java | 2 - .../BcOAEPEncodingTestFile.java | 5 +- .../blockcipher/BcCBCBlockCipherTestFile.java | 4 +- .../bc/aeadcipher/BcCCMBlockCipherTest.java | 4 +- .../bc/aeadcipher/BcChaCha20Poly1305Test.java | 4 +- .../bc/aeadcipher/BcEAXBlockCipherTest.java | 4 +- .../bc/aeadcipher/BcGCMBlockCipherTest.java | 4 +- .../aeadcipher/BcGCMSIVBlockCipherTest.java | 4 +- .../bc/aeadcipher/BcKCCMBlockCipherTest.java | 4 +- .../bc/aeadcipher/BcKGCMBlockCipherTest.java | 4 +- .../bc/aeadcipher/BcOCBBlockCipherTest.java | 4 +- .../BcBufferedAsymmetricBlockCipherTest.java | 4 +- .../BcISO9796d1EncodingTest.java | 4 +- .../BcPKCS1EncodingTest.java | 4 +- .../BcG3413CFBBlockCipherTest.java | 4 +- .../BcCTSBlockCipherTest.java | 4 +- .../BcDefaultBufferedBlockCipherTest.java | 4 +- .../BcNISTCTSBlockCipherTest.java | 4 +- ...dBufferedBlockCipherCustomPaddingTest.java | 4 +- .../BcPaddedBufferedBlockCipherTest.java | 4 +- .../BcKDFCounterBytesGeneratorTest.java | 4 +- .../BcBIKEKEMExtractorTest.java | 10 +- .../BcECIESKEMExtractorTest.java | 13 +- .../BcECIESKEMGeneratorTest.java | 13 +- .../BcKyberKEMGeneratorTest.java | 9 +- .../BcRSAKEMExtractorTest.java | 13 +- .../BcRSAKEMGeneratorTest.java | 13 +- .../bc/mac/BcBlockCipherMacTest.java | 4 +- .../bc/mac/BcCBCBlockCipherMacTest.java | 4 +- .../bc/mac/BcCFBBlockCipherMacTest.java | 4 +- .../rules/detection/bc/mac/BcCMACTest.java | 4 +- .../rules/detection/bc/mac/BcGMACTest.java | 4 +- .../bc/mac/BcISO9797Alg3MacTest.java | 4 +- .../rules/detection/bc/mac/BcKGMACTest.java | 4 +- .../rules/detection/bc/mac/BcKMACTest.java | 1 - .../detection/bc/mac/BcPoly1305Test.java | 4 +- .../bc/signer/BcDSADigestSignerTest.java | 4 +- .../bc/signer/BcGenericSignerTest.java | 2 +- .../bc/signer/BcISO9796d2SignerTest.java | 4 +- .../detection/bc/signer/BcPSSSignerTest.java | 4 +- .../detection/bc/signer/BcX931SignerTest.java | 4 +- .../bc/wrapper/BcRFC3394WrapEngineTest.java | 4 +- .../mapper/bc/BcDerivationFunctionMapper.java | 6 +- .../com/ibm/mapper/mapper/bc/BcDsaMapper.java | 3 +- .../com/ibm/mapper/mapper/bc/BcKemMapper.java | 131 +++++++++++++++--- .../com/ibm/mapper/mapper/bc/BcMacMapper.java | 1 - .../mapper/bc/BcStreamCipherEngineMapper.java | 1 - .../com/ibm/mapper/model/algorithms/AES.java | 22 ++- .../ibm/mapper/model/algorithms/ANSIX931.java | 19 ++- .../ibm/mapper/model/algorithms/ANSIX942.java | 19 ++- .../ibm/mapper/model/algorithms/ANSIX963.java | 19 ++- .../com/ibm/mapper/model/algorithms/Aria.java | 18 +++ .../com/ibm/mapper/model/algorithms/BIKE.java | 19 ++- .../ibm/mapper/model/algorithms/Blowfish.java | 18 +++ .../com/ibm/mapper/model/algorithms/CMAC.java | 19 ++- .../ibm/mapper/model/algorithms/ChaCha20.java | 18 +++ .../model/algorithms/ClassicMcEliece.java | 22 ++- .../model/algorithms/ConcatenationKDF.java | 21 ++- .../com/ibm/mapper/model/algorithms/DES.java | 19 ++- .../ibm/mapper/model/algorithms/DESede.java | 24 +++- .../com/ibm/mapper/model/algorithms/DH.java | 21 ++- .../ibm/mapper/model/algorithms/DSTU4145.java | 18 +++ .../mapper/model/algorithms/Dilithium.java | 19 ++- .../ibm/mapper/model/algorithms/ECCPWD.java | 18 +++ .../com/ibm/mapper/model/algorithms/ECDH.java | 18 +++ .../ibm/mapper/model/algorithms/ECDSA.java | 18 +++ .../ibm/mapper/model/algorithms/ECMQV.java | 20 ++- .../com/ibm/mapper/model/algorithms/ECNR.java | 61 ++++++++ .../ibm/mapper/model/algorithms/Ed25519.java | 18 +++ .../ibm/mapper/model/algorithms/Ed448.java | 18 +++ .../ibm/mapper/model/algorithms/ElGamal.java | 21 ++- .../ibm/mapper/model/algorithms/Falcon.java | 19 ++- .../ibm/mapper/model/algorithms/Fernet.java | 18 +++ .../ibm/mapper/model/algorithms/FrodoKEM.java | 19 ++- .../com/ibm/mapper/model/algorithms/GMSS.java | 22 ++- .../ibm/mapper/model/algorithms/GeMSS.java | 20 ++- .../com/ibm/mapper/model/algorithms/HC.java | 21 ++- .../com/ibm/mapper/model/algorithms/HKDF.java | 22 ++- .../com/ibm/mapper/model/algorithms/HMAC.java | 18 +++ .../com/ibm/mapper/model/algorithms/HQC.java | 22 ++- .../com/ibm/mapper/model/algorithms/HSS.java | 22 ++- .../ibm/mapper/model/algorithms/HarakaV2.java | 19 ++- .../com/ibm/mapper/model/algorithms/IDEA.java | 22 ++- .../ibm/mapper/model/algorithms/ISAAC.java | 22 ++- .../com/ibm/mapper/model/algorithms/KDF1.java | 20 ++- .../com/ibm/mapper/model/algorithms/KDF2.java | 23 ++- .../mapper/model/algorithms/KDFCounter.java | 19 ++- .../model/algorithms/KDFDoublePipeline.java | 19 ++- .../mapper/model/algorithms/KDFFeedback.java | 19 ++- .../mapper/model/algorithms/KDFSession.java | 25 +++- .../com/ibm/mapper/model/algorithms/KMAC.java | 19 ++- .../ibm/mapper/model/algorithms/Kalyna.java | 24 +++- .../model/algorithms/KangarooTwelve.java | 19 ++- .../ibm/mapper/model/algorithms/Keccak.java | 19 ++- .../ibm/mapper/model/algorithms/Kerberos.java | 18 +++ .../ibm/mapper/model/algorithms/Kupyna.java | 22 ++- .../com/ibm/mapper/model/algorithms/LEA.java | 19 ++- .../com/ibm/mapper/model/algorithms/LMS.java | 21 ++- .../com/ibm/mapper/model/algorithms/MD2.java | 18 +++ .../com/ibm/mapper/model/algorithms/MD4.java | 18 +++ .../com/ibm/mapper/model/algorithms/MD5.java | 18 +++ .../com/ibm/mapper/model/algorithms/MQV.java | 22 ++- .../model/algorithms/MarsupilamiFourteen.java | 18 +++ .../ibm/mapper/model/algorithms/NOEKEON.java | 19 ++- .../model/algorithms/NaccacheStern.java | 18 +++ .../ibm/mapper/model/algorithms/PBKDF1.java | 18 +++ .../ibm/mapper/model/algorithms/PBKDF2.java | 18 +++ .../com/ibm/mapper/model/algorithms/PSK.java | 19 ++- .../mapper/model/algorithms/ParallelHash.java | 19 ++- .../ibm/mapper/model/algorithms/Picnic.java | 21 ++- .../ibm/mapper/model/algorithms/Poly1305.java | 18 +++ .../ibm/mapper/model/algorithms/QTESLA.java | 19 ++- .../com/ibm/mapper/model/algorithms/RC2.java | 19 +++ .../com/ibm/mapper/model/algorithms/RC4.java | 22 ++- .../com/ibm/mapper/model/algorithms/RC5.java | 19 ++- .../com/ibm/mapper/model/algorithms/RC6.java | 19 ++- .../mapper/model/algorithms/RFC3211Wrap.java | 19 ++- .../ibm/mapper/model/algorithms/RIPEMD.java | 19 ++- .../com/ibm/mapper/model/algorithms/RSA.java | 18 +++ .../ibm/mapper/model/algorithms/RSAKEM.java | 20 ++- .../mapper/model/algorithms/RSAssaPSS.java | 19 ++- .../ibm/mapper/model/algorithms/Rainbow.java | 19 ++- .../ibm/mapper/model/algorithms/SABER.java | 19 ++- .../com/ibm/mapper/model/algorithms/SEED.java | 19 ++- .../com/ibm/mapper/model/algorithms/SHA2.java | 18 +++ .../com/ibm/mapper/model/algorithms/SHA3.java | 18 +++ .../com/ibm/mapper/model/algorithms/SM2.java | 19 ++- .../com/ibm/mapper/model/algorithms/SM3.java | 18 +++ .../com/ibm/mapper/model/algorithms/SM4.java | 20 ++- .../ibm/mapper/model/algorithms/SPHINCS.java | 19 ++- .../mapper/model/algorithms/SPHINCSPlus.java | 19 ++- .../com/ibm/mapper/model/algorithms/SRP.java | 19 ++- .../ibm/mapper/model/algorithms/Salsa20.java | 19 ++- .../ibm/mapper/model/algorithms/Scrypt.java | 18 +++ .../ibm/mapper/model/algorithms/Serpent.java | 27 +++- .../ibm/mapper/model/algorithms/SipHash.java | 19 ++- .../ibm/mapper/model/algorithms/Skein.java | 19 ++- .../ibm/mapper/model/algorithms/Skipjack.java | 19 ++- .../mapper/model/algorithms/Threefish.java | 19 ++- .../ibm/mapper/model/algorithms/Tiger.java | 21 ++- .../mapper/model/algorithms/TripleDES.java | 21 ++- .../mapper/model/algorithms/TupleHash.java | 19 ++- .../ibm/mapper/model/algorithms/Twofish.java | 19 ++- .../mapper/model/algorithms/Whirlpool.java | 19 ++- .../ibm/mapper/model/algorithms/X25519.java | 18 +++ .../com/ibm/mapper/model/algorithms/X448.java | 18 +++ .../com/ibm/mapper/model/algorithms/XDH.java | 18 +++ .../com/ibm/mapper/model/algorithms/XMSS.java | 25 +++- .../ibm/mapper/model/algorithms/XMSSMT.java | 23 ++- .../ibm/mapper/model/algorithms/Xoodyak.java | 19 ++- .../com/ibm/mapper/model/algorithms/ZUC.java | 19 ++- .../mapper/model/algorithms/ascon/Ascon.java | 19 ++- .../model/algorithms/ascon/Ascon128.java | 18 +++ .../model/algorithms/ascon/Ascon128a.java | 18 +++ .../model/algorithms/ascon/Ascon80pq.java | 18 +++ .../model/algorithms/ascon/AsconHash.java | 18 +++ .../model/algorithms/ascon/AsconXof.java | 18 +++ .../mapper/model/algorithms/blake/BLAKE.java | 18 +++ .../model/algorithms/blake/BLAKE2X.java | 19 ++- .../model/algorithms/blake/BLAKE2b.java | 19 ++- .../model/algorithms/blake/BLAKE2s.java | 19 ++- .../mapper/model/algorithms/blake/BLAKE3.java | 19 ++- .../mapper/model/algorithms/cast/CAST128.java | 22 ++- .../mapper/model/algorithms/cast/CAST256.java | 22 ++- .../model/algorithms/elephant/Delirium.java | 20 ++- .../model/algorithms/elephant/Dumbo.java | 20 ++- .../model/algorithms/elephant/Elephant.java | 19 ++- .../model/algorithms/elephant/Jumbo.java | 18 +++ .../model/algorithms/gost/CryptoPro.java | 19 ++- .../model/algorithms/gost/GOST28147.java | 25 +++- .../model/algorithms/gost/GOST341194.java | 25 +++- .../model/algorithms/gost/GOSTR341012.java | 20 ++- .../model/algorithms/gost/GOSTR341094.java | 20 ++- .../model/algorithms/gost/GOSTR341112.java | 20 ++- .../model/algorithms/gost/GOSTR34122015.java | 20 ++- .../model/algorithms/grain/Grain128AEAD.java | 19 ++- .../algorithms/grain/Grain128AEADv2.java | 19 ++- .../model/algorithms/grain/Grainv0.java | 19 ++- .../mapper/model/algorithms/ies/DLIES.java | 19 ++- .../mapper/model/algorithms/ies/ECIES.java | 19 ++- .../mapper/model/algorithms/ies/ECIESKEM.java | 20 ++- .../ibm/mapper/model/algorithms/ies/IES.java | 19 ++- .../mapper/model/algorithms/isap/Isap.java | 19 ++- .../mapper/model/algorithms/kyber/Kyber.java | 24 +++- .../mapper/model/algorithms/kyber/MLKEM.java | 24 +++- .../mapper/model/algorithms/ntru/NTRU.java | 18 +++ .../model/algorithms/ntru/NTRUEncrypt.java | 19 ++- .../model/algorithms/ntru/NTRULPrime.java | 19 ++- .../algorithms/ntru/StreamlinedNTRUPrime.java | 19 ++- .../photonbeetle/PhotonBeetleAEAD.java | 19 ++- .../photonbeetle/PhotonBeetleHash.java | 19 ++- .../model/algorithms/shacal/SHACAL1.java | 22 ++- .../model/algorithms/shacal/SHACAL2.java | 19 ++- .../mapper/model/algorithms/shake/CSHAKE.java | 20 ++- .../mapper/model/algorithms/shake/SHAKE.java | 18 +++ .../mapper/model/algorithms/sparkle/Esch.java | 22 ++- .../model/algorithms/sparkle/Schwaemm.java | 22 ++- .../model/algorithms/sparkle/XOEsch.java | 22 ++- .../ibm/mapper/model/algorithms/tea/TEA.java | 22 ++- .../ibm/mapper/model/algorithms/tea/XTEA.java | 21 ++- .../mapper/model/algorithms/vmpc/VMPC.java | 22 ++- .../mapper/model/algorithms/vmpc/VMPCKSA.java | 22 ++- .../mapper/model/algorithms/vmpc/VMPCMAC.java | 23 ++- .../collections/MergeableCollection.java | 1 + 216 files changed, 3200 insertions(+), 373 deletions(-) create mode 100644 mapper/src/main/java/com/ibm/mapper/model/algorithms/ECNR.java diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleDetectionRules.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleDetectionRules.java index 27917f6f..20af6755 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleDetectionRules.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleDetectionRules.java @@ -76,7 +76,6 @@ public static List> rules() { // Wrapper BcWrapperEngine.rules().stream(), // BasicAgreement - // TODO: Should it be an entry point or only a depending rule of IES? BcBasicAgreement.rules().stream(), // DerivationFunction BcDerivationFunction.rules().stream(), diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleInfoMap.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleInfoMap.java index e30bdf44..ac4d5144 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleInfoMap.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/BouncyCastleInfoMap.java @@ -30,30 +30,13 @@ * Instantiate this class to easily store information related to a cryptographic class name. Using * the function {@code putKey} and continuing with other "put" functions, information can be easily * stored into an {@code Info} class. The information can then be retrieved using the getter - * functions of the {@code Info} class, or dedicated helpers like the {@code getDisplayName} - * function. + * functions of the {@code Info} class. */ public class BouncyCastleInfoMap { private final Map map = new ConcurrentHashMap<>(); public static class Info { - @Nullable private String name; - - /** - * use the key of the map instead - * - * @deprecated - */ - @Deprecated(since = "2.0.0") - public String getName() { - return name; - } - - private void setName(@Nonnull String name) { - this.name = name; - } - @Nullable private String type; public String getType() { @@ -85,15 +68,6 @@ public InfoBuilder(String key) { private static final String errorMessage = "Unexpected missing key in InfoBuilder: "; - public InfoBuilder putName(@Nonnull String name) { - if (!map.containsKey(key)) { - throw new IllegalArgumentException(errorMessage + key); - } - Info info = map.get(key); - info.setName(name); - return this; - } - public InfoBuilder putType(@Nonnull String type) { if (!map.containsKey(key)) { throw new IllegalArgumentException(errorMessage + key); @@ -128,47 +102,4 @@ public InfoBuilder putKey(@Nonnull String key) { public Set> entrySet() { return map.entrySet(); } - - /** - * Returns the correct name of the cryptographic asset. If the asset name was specified with - * {@code putName}, it will return this name. Otherwise it will return the {@code key}. - * - * @param key - Key of the information map, typically the cryptographic class - * @return The correct name of the cryptographic asset - * @deprecated use the key of the map instead - */ - @Deprecated(since = "2.0.0") - public String getDisplayName(@Nonnull String key) { - return getDisplayName(key, null); - } - - /** - * Returns the correct name of the cryptographic asset. If the asset name was specified with - * {@code putName}, it will return this name. Otherwise it will return the {@code key}, possibly - * modified by the {@code removePart} argument. - * - * @param key - Key of the information map, typically the cryptographic class - * @param removePart - Substring to remove from the name (only when no specific name was defined - * with {@code putName}). If {@code null}, it does nothing. - * @return The correct name of the cryptographic asset - * @deprecated use the key of the map instead - */ - @Deprecated(since = "2.0.0") - public String getDisplayName(@Nonnull String key, String removePart) { - if (!map.containsKey(key)) { - throw new IllegalArgumentException("Key does not exist in the map: " + key); - } - - Info info = map.get(key); - - if (info.getName() != null) { - return info.getName(); - } else { - if (removePart == null) { - return key; - } else { - return key.replace(removePart, ""); - } - } - } } diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipher.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipher.java index 77bc5bba..c1c80765 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipher.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipher.java @@ -38,8 +38,6 @@ private BcOCBBlockCipher() { private static final String MODE = "OCBBlockCipher"; - // TODO: add a way to distinguish between the main and the hash ciphers, - // that can be used in translation private static final IDetectionRule CONSTRUCTOR_1 = new DetectionRuleBuilder() .createDetectionRule() diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcBlockCipher.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcBlockCipher.java index 77c46066..187eabd8 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcBlockCipher.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcBlockCipher.java @@ -187,8 +187,7 @@ private static final List> specialConstructors( constructorsList.add( new DetectionRuleBuilder() .createDetectionRule() - // TODO: forExactObjectTypes(...) - .forObjectTypes("org.bouncycastle.crypto.modes.PGPCFBBlockCipher") + .forObjectExactTypes("org.bouncycastle.crypto.modes.PGPCFBBlockCipher") .forConstructor() .shouldBeDetectedAs(new ValueActionFactory<>("PGPCFBBlockCipher")) .withMethodParameter("org.bouncycastle.crypto.BlockCipher") diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcBufferedBlockCipher.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcBufferedBlockCipher.java index 94a04f62..babe90c3 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcBufferedBlockCipher.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcBufferedBlockCipher.java @@ -49,7 +49,7 @@ private BcBufferedBlockCipher() { infoMap.putKey("DefaultBufferedBlockCipher").putType(typePrefix); // <–– parent class infoMap.putKey("CTSBlockCipher").putType(typePrefix + "modes."); infoMap.putKey("KXTSBlockCipher").putType(typePrefix + "modes."); - infoMap.putKey("OldCTSBlockCipher").putName("CTS").putType(typePrefix + "modes."); + infoMap.putKey("OldCTSBlockCipher").putType(typePrefix + "modes."); infoMap.putKey("PaddedBlockCipher").putType(typePrefix + "modes."); } @@ -84,7 +84,6 @@ private BcBufferedBlockCipher() { .forConstructor() .shouldBeDetectedAs(new ValueActionFactory<>("NISTCTSBlockCipher")) .withMethodParameter("int") - // TODO: "Type": should it be detected? .withMethodParameter("org.bouncycastle.crypto.BlockCipher") .addDependingDetectionRules(BcBlockCipher.all()) .buildForContext(new CipherContext(Map.of("kind", "BUFFERED_BLOCK_CIPHER"))) diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcGMSSParameters.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcGMSSParameters.java index 4889c01b..a54cb87d 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcGMSSParameters.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcGMSSParameters.java @@ -99,7 +99,6 @@ private BcGMSSParameters() { .inBundle(() -> "Bc") .withoutDependingDetectionRules(); - // TODO: add a test case for this constructor private static final IDetectionRule PRIVATE_KEY_CONSTRUCTOR_1 = new DetectionRuleBuilder() .createDetectionRule() @@ -126,7 +125,6 @@ private BcGMSSParameters() { .inBundle(() -> "Bc") .withoutDependingDetectionRules(); - // TODO: add a test case for this constructor private static final IDetectionRule PRIVATE_KEY_CONSTRUCTOR_2 = new DetectionRuleBuilder() .createDetectionRule() diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcSABERParameters.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcSABERParameters.java index 2a9a5b08..08e880f6 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcSABERParameters.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/cipherparameters/BcSABERParameters.java @@ -48,11 +48,6 @@ private BcSABERParameters() { .withMethodParameter("int") .shouldBeDetectedAs(new KeySizeFactory<>(Size.UnitType.BIT)) .withMethodParameter("boolean") - /* - * TODO: How to translate below? - * It comes from using SABERParameters with `usingAes == true` - */ - // .shouldBeDetectedAs(new BooleanFactory<>()) // captures `usingAes` .withMethodParameter("boolean") .buildForContext(new AlgorithmParameterContext()) .inBundle(() -> "Bc") diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcDerivationFunction.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcDerivationFunction.java index 75a9f291..a218e550 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcDerivationFunction.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcDerivationFunction.java @@ -100,7 +100,6 @@ private BcDerivationFunction() { .withMethodParameter("org.bouncycastle.crypto.Digest") .addDependingDetectionRules(BcDigests.rules()) .buildForContext(new KeyContext(Map.of("kind", "KDF"))) - // TODO: .withDependingDetectionRules(DerivationFunctionInit.rules())); .inBundle(() -> "Bc") .withoutDependingDetectionRules()); } @@ -117,7 +116,6 @@ private BcDerivationFunction() { .withMethodParameter("org.bouncycastle.crypto.Mac") .addDependingDetectionRules(BcMac.rules()) .buildForContext(new KeyContext(Map.of("kind", "KDF"))) - // TODO: .withDependingDetectionRules(DerivationFunctionInit.rules())); .inBundle(() -> "Bc") .withoutDependingDetectionRules()); } @@ -139,7 +137,6 @@ private BcDerivationFunction() { .withMethodParameter("org.bouncycastle.crypto.Digest") .addDependingDetectionRules(BcDigests.rules()) .buildForContext(new KeyContext(Map.of("kind", "KDF"))) - // TODO: .withDependingDetectionRules(DerivationFunctionInit.rules())); .inBundle(() -> "Bc") .withoutDependingDetectionRules()); diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/dsa/BcDSA.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/dsa/BcDSA.java index 79a3e2cd..a983416a 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/dsa/BcDSA.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/dsa/BcDSA.java @@ -37,8 +37,6 @@ private BcDSA() { // nothing } - /* TODO: maybe the function `extractSecret` would be a better entry point than the constructors? */ - public static final List dsas = List.of( "DSASigner", diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/mac/BcMac.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/mac/BcMac.java index 8d8ab467..aadffc57 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/mac/BcMac.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/mac/BcMac.java @@ -385,8 +385,6 @@ private BcMac() { .forObjectTypes("org.bouncycastle.crypto.macs.SkeinMac") .forConstructor() .shouldBeDetectedAs(new ValueActionFactory<>("SkeinMac")) - // TODO: Should I capture this parameter? - // Could that lead to an infinity of depending detection rules? .withMethodParameter("org.bouncycastle.crypto.macs.SkeinMac") .buildForContext(new MacContext()) .inBundle(() -> "Bc") diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/other/BcIESEngineInit.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/other/BcIESEngineInit.java index 9a97e5eb..3da97888 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/other/BcIESEngineInit.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/other/BcIESEngineInit.java @@ -45,7 +45,6 @@ private BcIESEngineInit() { .withMethodParameter("org.bouncycastle.crypto.params.AsymmetricKeyParameter") .withMethodParameter("org.bouncycastle.crypto.CipherParameters") .addDependingDetectionRules(BcCipherParameters.rules()) - // TODO: capture? .withMethodParameter( "org.bouncycastle.crypto.generators.EphemeralKeyPairGenerator") .buildForContext(new CipherContext()) @@ -61,7 +60,6 @@ private BcIESEngineInit() { .withMethodParameter("org.bouncycastle.crypto.params.AsymmetricKeyParameter") .withMethodParameter("org.bouncycastle.crypto.CipherParameters") .addDependingDetectionRules(BcCipherParameters.rules()) - // TODO: capture? .withMethodParameter("org.bouncycastle.crypto.KeyParser") .buildForContext(new CipherContext()) .inBundle(() -> "Bc") diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcPQCSigner.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcPQCSigner.java index e92872c0..a307877e 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcPQCSigner.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcPQCSigner.java @@ -34,7 +34,6 @@ import org.sonar.plugins.java.api.tree.Tree; public final class BcPQCSigner { - // TODO: Need support for MessageSigner and StateAwareMessageSigner first private BcPQCSigner() { // nothing diff --git a/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcSimpleSigner.java b/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcSimpleSigner.java index 4708a0fc..36aeb615 100644 --- a/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcSimpleSigner.java +++ b/java/src/main/java/com/ibm/plugin/rules/detection/bc/signer/BcSimpleSigner.java @@ -37,8 +37,6 @@ private BcSimpleSigner() { // nothing } - /* TODO: maybe the function `extractSecret` would be a better entry point than the constructors? */ - private static final List simpleSigners = Arrays.asList( "Ed25519Signer" /* standard algorithm */, diff --git a/java/src/test/files/rules/detection/bc/asymmetricblockcipher/BcOAEPEncodingTestFile.java b/java/src/test/files/rules/detection/bc/asymmetricblockcipher/BcOAEPEncodingTestFile.java index a397dfcc..20d1a399 100644 --- a/java/src/test/files/rules/detection/bc/asymmetricblockcipher/BcOAEPEncodingTestFile.java +++ b/java/src/test/files/rules/detection/bc/asymmetricblockcipher/BcOAEPEncodingTestFile.java @@ -16,13 +16,12 @@ public class BcOAEPEncodingTestFile { public byte[] encryptCEK1(final RSAPublicKey pub, final SecretKey cek) throws RuntimeException { try { - // TODO: This detection should optimally not happen once RSA has been detected as a child finding of OAEPEncoding + // This detection should optimally not happen once RSA has been detected as a child finding of OAEPEncoding AsymmetricBlockCipher engine = new RSAEngine(); // Noncompliant {{RSAEngine}} // TODO: Using intermediate variables should also work // Digest digest = new ShortenedDigest(new SHA3Digest(), 16); // Digest digest = new SHA3Digest(); - // TODO: Duplicate detection of SHA3 (see detection store) OAEPEncoding cipher = new OAEPEncoding(engine, new ShortenedDigest(new SHA3Digest(), 16)); // Noncompliant {{OAEPEncoding}} BigInteger mod = pub.getModulus(); @@ -46,7 +45,7 @@ public byte[] encryptCEK1(final RSAPublicKey pub, final SecretKey cek) public byte[] encryptCEK2(final RSAPublicKey pub, final SecretKey cek) throws RuntimeException { try { - // TODO: This detection should optimally not happen once RSA has been detected as a child finding of OAEPEncoding + // This detection should optimally not happen once RSA has been detected as a child finding of OAEPEncoding AsymmetricBlockCipher engine = new RSAEngine(); // Noncompliant {{RSAEngine}} OAEPEncoding cipher = new OAEPEncoding(engine, new NonMemoableDigest(new SHA3Digest()), new SHA512Digest(), new byte[16]); // Noncompliant {{OAEPEncoding}} diff --git a/java/src/test/files/rules/detection/bc/blockcipher/BcCBCBlockCipherTestFile.java b/java/src/test/files/rules/detection/bc/blockcipher/BcCBCBlockCipherTestFile.java index f4be53a2..0cc482ce 100644 --- a/java/src/test/files/rules/detection/bc/blockcipher/BcCBCBlockCipherTestFile.java +++ b/java/src/test/files/rules/detection/bc/blockcipher/BcCBCBlockCipherTestFile.java @@ -5,7 +5,7 @@ public class BcCBCBlockCipherTestFile { public void AESCipherCBCnoPad1(byte[] key) { - // TODO: This detection should optimally not happen once AES has been detected as a child finding of CBCBlockCipher + // This detection should optimally not happen once AES has been detected as a child finding of CBCBlockCipher org.bouncycastle.crypto.BlockCipher aes = new AESFastEngine(); // Noncompliant {{AESFastEngine}} CBCBlockCipher cbc = new CBCBlockCipher(aes); // Noncompliant {{CBCBlockCipher}} KeyParameter kp = new KeyParameter(key); @@ -14,7 +14,7 @@ public void AESCipherCBCnoPad1(byte[] key) { } public void AESCipherCBCnoPad2(byte[] key) { - // TODO: This detection should optimally not happen once AES has been detected as a child finding of CBCBlockCipher + // This detection should optimally not happen once AES has been detected as a child finding of CBCBlockCipher org.bouncycastle.crypto.BlockCipher aes = AESEngine.newInstance(); // Noncompliant {{AESEngine}} CBCBlockCipher cbc = CBCBlockCipher.newInstance(aes); // Noncompliant {{CBCBlockCipher}} KeyParameter kp = new KeyParameter(key); diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcCCMBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcCCMBlockCipherTest.java index 40b3c178..12046718 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcCCMBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcCCMBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 2) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcChaCha20Poly1305Test.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcChaCha20Poly1305Test.java index 99f96a81..2c54480b 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcChaCha20Poly1305Test.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcChaCha20Poly1305Test.java @@ -63,8 +63,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 2) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcEAXBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcEAXBlockCipherTest.java index b241bf64..bdc24cbc 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcEAXBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcEAXBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMBlockCipherTest.java index 1e15c7da..10633e99 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 2 || findingId == 4 || findingId == 6) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMSIVBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMSIVBlockCipherTest.java index 2923b7ca..de017918 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMSIVBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcGCMSIVBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 1 || findingId == 3) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKCCMBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKCCMBlockCipherTest.java index 3c9458b8..bd34138c 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKCCMBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKCCMBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 2) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKGCMBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKGCMBlockCipherTest.java index 63f08fa5..c9662b6a 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKGCMBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcKGCMBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipherTest.java index 0696f753..01ea811a 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/aeadcipher/BcOCBBlockCipherTest.java @@ -62,8 +62,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcBufferedAsymmetricBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcBufferedAsymmetricBlockCipherTest.java index 50cd50d8..076acc5b 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcBufferedAsymmetricBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcBufferedAsymmetricBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcISO9796d1EncodingTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcISO9796d1EncodingTest.java index 936ea2e9..04122212 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcISO9796d1EncodingTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcISO9796d1EncodingTest.java @@ -59,8 +59,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcPKCS1EncodingTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcPKCS1EncodingTest.java index cb0e574f..e4f83da1 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcPKCS1EncodingTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/asymmetricblockcipher/BcPKCS1EncodingTest.java @@ -59,8 +59,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcG3413CFBBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcG3413CFBBlockCipherTest.java index 2e06cbda..c3d0d318 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcG3413CFBBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/blockcipher/BcG3413CFBBlockCipherTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcCTSBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcCTSBlockCipherTest.java index a2706fde..f271be9c 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcCTSBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcCTSBlockCipherTest.java @@ -58,8 +58,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcDefaultBufferedBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcDefaultBufferedBlockCipherTest.java index 8a0b942e..4696efda 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcDefaultBufferedBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcDefaultBufferedBlockCipherTest.java @@ -57,8 +57,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcNISTCTSBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcNISTCTSBlockCipherTest.java index 84931541..24321a61 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcNISTCTSBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcNISTCTSBlockCipherTest.java @@ -59,8 +59,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherCustomPaddingTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherCustomPaddingTest.java index 493ac581..01039378 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherCustomPaddingTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherCustomPaddingTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherTest.java index ebc607f9..dd8e97e9 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/bufferedblockcipher/BcPaddedBufferedBlockCipherTest.java @@ -60,8 +60,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcKDFCounterBytesGeneratorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcKDFCounterBytesGeneratorTest.java index b9f390b6..c6047a6d 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcKDFCounterBytesGeneratorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/derivationfunction/BcKDFCounterBytesGeneratorTest.java @@ -65,8 +65,8 @@ public void asserts( @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcBIKEKEMExtractorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcBIKEKEMExtractorTest.java index 6688627f..c3c4a313 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcBIKEKEMExtractorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcBIKEKEMExtractorTest.java @@ -27,6 +27,7 @@ import com.ibm.engine.model.context.KeyContext; import com.ibm.mapper.model.INode; import com.ibm.mapper.model.KeyEncapsulationMechanism; +import com.ibm.mapper.model.functionality.Decapsulate; import com.ibm.plugin.TestBase; import com.ibm.plugin.rules.detection.bc.BouncyCastleJars; import java.util.List; @@ -54,7 +55,6 @@ public void asserts( int findingId, @NotNull DetectionStore detectionStore, @NotNull List nodes) { - /* * Detection Store */ @@ -75,7 +75,13 @@ public void asserts( INode keyEncapsulationMechanismNode = nodes.get(0); assertThat(keyEncapsulationMechanismNode.getKind()) .isEqualTo(KeyEncapsulationMechanism.class); - assertThat(keyEncapsulationMechanismNode.getChildren()).isEmpty(); + assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(1); assertThat(keyEncapsulationMechanismNode.asString()).isEqualTo("BIKE"); + + // Decapsulate under KeyEncapsulationMechanism + INode decapsulateNode = keyEncapsulationMechanismNode.getChildren().get(Decapsulate.class); + assertThat(decapsulateNode).isNotNull(); + assertThat(decapsulateNode.getChildren()).isEmpty(); + assertThat(decapsulateNode.asString()).isEqualTo("DECAPSULATE"); } } diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMExtractorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMExtractorTest.java index 2831a3e4..9f996425 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMExtractorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMExtractorTest.java @@ -32,6 +32,7 @@ import com.ibm.mapper.model.KeyEncapsulationMechanism; import com.ibm.mapper.model.KeyLength; import com.ibm.mapper.model.MessageDigest; +import com.ibm.mapper.model.functionality.Decapsulate; import com.ibm.plugin.TestBase; import com.ibm.plugin.rules.detection.bc.BouncyCastleJars; import java.util.List; @@ -60,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; @@ -111,7 +112,7 @@ public void asserts( INode keyEncapsulationMechanismNode = nodes.get(0); assertThat(keyEncapsulationMechanismNode.getKind()) .isEqualTo(KeyEncapsulationMechanism.class); - assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(2); + assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(3); assertThat(keyEncapsulationMechanismNode.asString()).isEqualTo("ECIES-KEM"); // KeyLength under KeyEncapsulationMechanism @@ -133,5 +134,11 @@ public void asserts( assertThat(messageDigestNode1).isNotNull(); assertThat(messageDigestNode1.getChildren()).hasSize(4); assertThat(messageDigestNode1.asString()).isEqualTo("SHA256"); + + // Decapsulate under KeyEncapsulationMechanism + INode decapsulateNode = keyEncapsulationMechanismNode.getChildren().get(Decapsulate.class); + assertThat(decapsulateNode).isNotNull(); + assertThat(decapsulateNode.getChildren()).isEmpty(); + assertThat(decapsulateNode.asString()).isEqualTo("DECAPSULATE"); } } diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMGeneratorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMGeneratorTest.java index c6405207..a9a1bb09 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMGeneratorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcECIESKEMGeneratorTest.java @@ -32,6 +32,7 @@ import com.ibm.mapper.model.KeyEncapsulationMechanism; import com.ibm.mapper.model.KeyLength; import com.ibm.mapper.model.MessageDigest; +import com.ibm.mapper.model.functionality.Encapsulate; import com.ibm.plugin.TestBase; import com.ibm.plugin.rules.detection.bc.BouncyCastleJars; import java.util.List; @@ -60,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; @@ -111,7 +112,7 @@ public void asserts( INode keyEncapsulationMechanismNode = nodes.get(0); assertThat(keyEncapsulationMechanismNode.getKind()) .isEqualTo(KeyEncapsulationMechanism.class); - assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(2); + assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(3); assertThat(keyEncapsulationMechanismNode.asString()).isEqualTo("ECIES-KEM"); // KeyLength under KeyEncapsulationMechanism @@ -133,5 +134,11 @@ public void asserts( assertThat(messageDigestNode1).isNotNull(); assertThat(messageDigestNode1.getChildren()).hasSize(4); assertThat(messageDigestNode1.asString()).isEqualTo("SHA256"); + + // Decapsulate under KeyEncapsulationMechanism + INode decapsulateNode = keyEncapsulationMechanismNode.getChildren().get(Encapsulate.class); + assertThat(decapsulateNode).isNotNull(); + assertThat(decapsulateNode.getChildren()).isEmpty(); + assertThat(decapsulateNode.asString()).isEqualTo("ENCAPSULATE"); } } diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcKyberKEMGeneratorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcKyberKEMGeneratorTest.java index 4bdc354e..505d35d3 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcKyberKEMGeneratorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcKyberKEMGeneratorTest.java @@ -27,6 +27,7 @@ import com.ibm.engine.model.context.KeyContext; import com.ibm.mapper.model.INode; import com.ibm.mapper.model.KeyEncapsulationMechanism; +import com.ibm.mapper.model.functionality.Encapsulate; import com.ibm.plugin.TestBase; import com.ibm.plugin.rules.detection.bc.BouncyCastleJars; import java.util.List; @@ -75,7 +76,13 @@ public void asserts( INode keyEncapsulationMechanismNode = nodes.get(0); assertThat(keyEncapsulationMechanismNode.getKind()) .isEqualTo(KeyEncapsulationMechanism.class); - assertThat(keyEncapsulationMechanismNode.getChildren()).isEmpty(); + assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(1); assertThat(keyEncapsulationMechanismNode.asString()).isEqualTo("Kyber"); + + // Decapsulate under KeyEncapsulationMechanism + INode decapsulateNode = keyEncapsulationMechanismNode.getChildren().get(Encapsulate.class); + assertThat(decapsulateNode).isNotNull(); + assertThat(decapsulateNode.getChildren()).isEmpty(); + assertThat(decapsulateNode.asString()).isEqualTo("ENCAPSULATE"); } } diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMExtractorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMExtractorTest.java index 7ec38919..3807b769 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMExtractorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMExtractorTest.java @@ -32,6 +32,7 @@ import com.ibm.mapper.model.KeyEncapsulationMechanism; import com.ibm.mapper.model.KeyLength; import com.ibm.mapper.model.MessageDigest; +import com.ibm.mapper.model.functionality.Decapsulate; import com.ibm.plugin.TestBase; import com.ibm.plugin.rules.detection.bc.BouncyCastleJars; import java.util.List; @@ -60,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; @@ -111,7 +112,7 @@ public void asserts( INode keyEncapsulationMechanismNode = nodes.get(0); assertThat(keyEncapsulationMechanismNode.getKind()) .isEqualTo(KeyEncapsulationMechanism.class); - assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(2); + assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(3); assertThat(keyEncapsulationMechanismNode.asString()).isEqualTo("RSA-KEM"); // KeyLength under KeyEncapsulationMechanism @@ -133,5 +134,11 @@ public void asserts( assertThat(messageDigestNode1).isNotNull(); assertThat(messageDigestNode1.getChildren()).hasSize(4); assertThat(messageDigestNode1.asString()).isEqualTo("SHA256"); + + // Decapsulate under KeyEncapsulationMechanism + INode decapsulateNode = keyEncapsulationMechanismNode.getChildren().get(Decapsulate.class); + assertThat(decapsulateNode).isNotNull(); + assertThat(decapsulateNode.getChildren()).isEmpty(); + assertThat(decapsulateNode.asString()).isEqualTo("DECAPSULATE"); } } diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMGeneratorTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMGeneratorTest.java index 7cc48ef9..bb8a586c 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMGeneratorTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/encapsulatedsecret/BcRSAKEMGeneratorTest.java @@ -32,6 +32,7 @@ import com.ibm.mapper.model.KeyEncapsulationMechanism; import com.ibm.mapper.model.KeyLength; import com.ibm.mapper.model.MessageDigest; +import com.ibm.mapper.model.functionality.Encapsulate; import com.ibm.plugin.TestBase; import com.ibm.plugin.rules.detection.bc.BouncyCastleJars; import java.util.List; @@ -60,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; @@ -111,7 +112,7 @@ public void asserts( INode keyEncapsulationMechanismNode = nodes.get(0); assertThat(keyEncapsulationMechanismNode.getKind()) .isEqualTo(KeyEncapsulationMechanism.class); - assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(2); + assertThat(keyEncapsulationMechanismNode.getChildren()).hasSize(3); assertThat(keyEncapsulationMechanismNode.asString()).isEqualTo("RSA-KEM"); // KeyLength under KeyEncapsulationMechanism @@ -133,5 +134,11 @@ public void asserts( assertThat(messageDigestNode1).isNotNull(); assertThat(messageDigestNode1.getChildren()).hasSize(4); assertThat(messageDigestNode1.asString()).isEqualTo("SHA256"); + + // Decapsulate under KeyEncapsulationMechanism + INode decapsulateNode = keyEncapsulationMechanismNode.getChildren().get(Encapsulate.class); + assertThat(decapsulateNode).isNotNull(); + assertThat(decapsulateNode.getChildren()).isEmpty(); + assertThat(decapsulateNode.asString()).isEqualTo("ENCAPSULATE"); } } diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcBlockCipherMacTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcBlockCipherMacTest.java index 980969b5..e31cccef 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcBlockCipherMacTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcBlockCipherMacTest.java @@ -59,8 +59,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCBCBlockCipherMacTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCBCBlockCipherMacTest.java index 475bc30d..7acb9802 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCBCBlockCipherMacTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCBCBlockCipherMacTest.java @@ -63,8 +63,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId % 2 == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCFBBlockCipherMacTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCFBBlockCipherMacTest.java index 9e4fa5eb..ce7db5ee 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCFBBlockCipherMacTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCFBBlockCipherMacTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCMACTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCMACTest.java index 2766ca8d..5575e3e1 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCMACTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcCMACTest.java @@ -59,8 +59,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcGMACTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcGMACTest.java index 93cdad23..d3e51baa 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcGMACTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcGMACTest.java @@ -59,8 +59,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcISO9797Alg3MacTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcISO9797Alg3MacTest.java index 7df1e193..a690c288 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcISO9797Alg3MacTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcISO9797Alg3MacTest.java @@ -60,8 +60,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKGMACTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKGMACTest.java index 73899319..63b496e6 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKGMACTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKGMACTest.java @@ -61,8 +61,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKMACTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKMACTest.java index 1cd97e12..60f90fd4 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKMACTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcKMACTest.java @@ -100,7 +100,6 @@ public void asserts( assertThat(xofNode).isNotNull(); assertThat(xofNode.getChildren()).hasSize(1); assertThat(xofNode.asString()).isEqualTo("cSHAKE"); - /* TODO: optimally, we would capture cSHAKE256 here (using enrichment) */ // Digest under ExtendableOutputFunction under Mac INode digestNode = xofNode.getChildren().get(Digest.class); diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcPoly1305Test.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcPoly1305Test.java index 2dc3964d..cbeb779e 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcPoly1305Test.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/mac/BcPoly1305Test.java @@ -58,8 +58,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcDSADigestSignerTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcDSADigestSignerTest.java index 15707796..268fb1e0 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcDSADigestSignerTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcDSADigestSignerTest.java @@ -62,8 +62,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcGenericSignerTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcGenericSignerTest.java index 382325fc..ae368f30 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcGenericSignerTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcGenericSignerTest.java @@ -64,7 +64,7 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have direct detections of engines, as they appear in the + * Optimally, we shouldn't have direct detections of engines, as they appear in the * depending detection rules */ if (findingId == 1) { diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcISO9796d2SignerTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcISO9796d2SignerTest.java index 9be3c3c0..105290a1 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcISO9796d2SignerTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcISO9796d2SignerTest.java @@ -65,8 +65,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcPSSSignerTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcPSSSignerTest.java index 23af8647..b9e3efe8 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcPSSSignerTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcPSSSignerTest.java @@ -65,8 +65,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcX931SignerTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcX931SignerTest.java index 9d5aac8d..7390995d 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcX931SignerTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/signer/BcX931SignerTest.java @@ -65,8 +65,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 1) { return; diff --git a/java/src/test/java/com/ibm/plugin/rules/detection/bc/wrapper/BcRFC3394WrapEngineTest.java b/java/src/test/java/com/ibm/plugin/rules/detection/bc/wrapper/BcRFC3394WrapEngineTest.java index 30fc4099..f60466c3 100644 --- a/java/src/test/java/com/ibm/plugin/rules/detection/bc/wrapper/BcRFC3394WrapEngineTest.java +++ b/java/src/test/java/com/ibm/plugin/rules/detection/bc/wrapper/BcRFC3394WrapEngineTest.java @@ -60,8 +60,8 @@ public void asserts( @NotNull DetectionStore detectionStore, @NotNull List nodes) { /** - * TODO: Optimally, we shouldn't have these direct detections of engines, as they appear in - * the depending detection rules + * Optimally, we shouldn't have these direct detections of engines, as they appear in the + * depending detection rules */ if (findingId == 0 || findingId == 2) { return; diff --git a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDerivationFunctionMapper.java b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDerivationFunctionMapper.java index 42bd19b6..f439fbd8 100644 --- a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDerivationFunctionMapper.java +++ b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDerivationFunctionMapper.java @@ -65,17 +65,17 @@ private Optional map( // "RFC 2631 Diffie-hellman KEK derivation function" // https://datatracker.ietf.org/doc/html/rfc2631#section-2.1.3 final KeyDerivationFunction kdf = new ANSIX942(detectionLocation); - kdf.put(new KeyDerivation(detectionLocation)); // TODO: add to enrichment + kdf.put(new KeyDerivation(detectionLocation)); yield Optional.of(kdf); } case "ECDHKEKGenerator" -> { // "X9.63 based key derivation function for ECDH CMS" // https://csrc.nist.gov/CSRC/media/Events/Key-Management-Workshop-2000/documents/x963_overview.pdf final KeyDerivationFunction kdf = new ANSIX963(detectionLocation); - kdf.put(new KeyDerivation(detectionLocation)); // TODO: add to enrichment + kdf.put(new KeyDerivation(detectionLocation)); yield Optional.of(new ANSIX963(detectionLocation)); } - // TODO: case "HandshakeKDFFunction" -> Optional.of(); + /* case "HandshakeKDFFunction" -> Optional.of(); // TODO: which algorithm should it be mapped to? */ case "GSKKFDGenerator" -> Optional.of(new KDFSession(detectionLocation)); case "HKDFBytesGenerator" -> Optional.of(new HKDF(detectionLocation)); case "KDF1BytesGenerator" -> Optional.of(new KDF1(detectionLocation)); diff --git a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDsaMapper.java b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDsaMapper.java index b1668c8d..5b86c6b6 100644 --- a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDsaMapper.java +++ b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcDsaMapper.java @@ -27,6 +27,7 @@ import com.ibm.mapper.model.algorithms.DSA; import com.ibm.mapper.model.algorithms.DSTU4145; import com.ibm.mapper.model.algorithms.ECDSA; +import com.ibm.mapper.model.algorithms.ECNR; import com.ibm.mapper.model.algorithms.gost.GOSTR341012; import com.ibm.mapper.model.algorithms.gost.GOSTR341094; import com.ibm.mapper.utils.DetectionLocation; @@ -55,7 +56,7 @@ private Optional map( case "ECDSASigner" -> Optional.of(new ECDSA(detectionLocation)); case "ECGOST3410_2012Signer" -> Optional.of(new GOSTR341012(detectionLocation)); case "ECGOST3410Signer" -> Optional.of(new GOSTR341012(detectionLocation)); - // TOOD: case "ECNRSigner" -> Optional.of(); + case "ECNRSigner" -> Optional.of(new ECNR(detectionLocation)); case "GOST3410Signer" -> Optional.of(new GOSTR341094(detectionLocation)); default -> { final Algorithm algorithm = diff --git a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcKemMapper.java b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcKemMapper.java index 21dc4f6e..634871de 100644 --- a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcKemMapper.java +++ b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcKemMapper.java @@ -35,6 +35,8 @@ import com.ibm.mapper.model.algorithms.ntru.NTRU; import com.ibm.mapper.model.algorithms.ntru.NTRULPrime; import com.ibm.mapper.model.algorithms.ntru.StreamlinedNTRUPrime; +import com.ibm.mapper.model.functionality.Decapsulate; +import com.ibm.mapper.model.functionality.Encapsulate; import com.ibm.mapper.utils.DetectionLocation; import java.util.Optional; import javax.annotation.Nonnull; @@ -56,25 +58,116 @@ public Optional parse( private Optional map( @Nonnull String kemString, @Nonnull DetectionLocation detectionLocation) { return switch (kemString) { - case "BIKEKEMExtractor", "BIKEKEMGenerator" -> Optional.of(new BIKE(detectionLocation)); - case "CMCEKEMExtractor", "CMCEKEMGenerator" -> - Optional.of(new ClassicMcEliece(detectionLocation)); - case "ECIESKEMExtractor", "ECIESKEMGenerator" -> - Optional.of(new ECIESKEM(detectionLocation)); - case "FrodoKEMExtractor", "FrodoKEMGenerator" -> - Optional.of(new FrodoKEM(detectionLocation)); - case "HQCKEMExtractor", "HQCKEMGenerator" -> - Optional.of(new HQC(KeyEncapsulationMechanism.class, detectionLocation)); - case "KyberKEMExtractor", "KyberKEMGenerator" -> - Optional.of(new Kyber(detectionLocation)); - case "NTRUKEMExtractor", "NTRUKEMGenerator" -> Optional.of(new NTRU(detectionLocation)); - case "NTRULPRimeKEMExtractor", "NTRULPRimeKEMGenerator" -> - Optional.of(new NTRULPrime(detectionLocation)); - case "RSAKEMExtractor", "RSAKEMGenerator" -> Optional.of(new RSAKEM(detectionLocation)); - case "SABERKEMExtractor", "SABERKEMGenerator" -> - Optional.of(new SABER(detectionLocation)); - case "SNTRUPrimeKEMExtractor", "SNTRUPrimeKEMGenerator" -> - Optional.of(new StreamlinedNTRUPrime(detectionLocation)); + case "BIKEKEMExtractor" -> { + var bike = new BIKE(detectionLocation); + bike.put(new Decapsulate(detectionLocation)); + yield Optional.of(bike); + } + case "BIKEKEMGenerator" -> { + var bike = new BIKE(detectionLocation); + bike.put(new Encapsulate(detectionLocation)); + yield Optional.of(bike); + } + case "CMCEKEMExtractor" -> { + var cmce = new ClassicMcEliece(detectionLocation); + cmce.put(new Decapsulate(detectionLocation)); + yield Optional.of(cmce); + } + case "CMCEKEMGenerator" -> { + var cmce = new ClassicMcEliece(detectionLocation); + cmce.put(new Encapsulate(detectionLocation)); + yield Optional.of(cmce); + } + case "ECIESKEMExtractor" -> { + var ecies = new ECIESKEM(detectionLocation); + ecies.put(new Decapsulate(detectionLocation)); + yield Optional.of(ecies); + } + case "ECIESKEMGenerator" -> { + var ecies = new ECIESKEM(detectionLocation); + ecies.put(new Encapsulate(detectionLocation)); + yield Optional.of(ecies); + } + case "FrodoKEMExtractor" -> { + var frodo = new FrodoKEM(detectionLocation); + frodo.put(new Decapsulate(detectionLocation)); + yield Optional.of(frodo); + } + case "FrodoKEMGenerator" -> { + var frodo = new FrodoKEM(detectionLocation); + frodo.put(new Encapsulate(detectionLocation)); + yield Optional.of(frodo); + } + case "HQCKEMExtractor" -> { + var hqc = new HQC(KeyEncapsulationMechanism.class, detectionLocation); + hqc.put(new Decapsulate(detectionLocation)); + yield Optional.of(hqc); + } + case "HQCKEMGenerator" -> { + var hqc = new HQC(KeyEncapsulationMechanism.class, detectionLocation); + hqc.put(new Encapsulate(detectionLocation)); + yield Optional.of(hqc); + } + case "KyberKEMExtractor" -> { + var kyber = new Kyber(detectionLocation); + kyber.put(new Decapsulate(detectionLocation)); + yield Optional.of(kyber); + } + case "KyberKEMGenerator" -> { + var kyber = new Kyber(detectionLocation); + kyber.put(new Encapsulate(detectionLocation)); + yield Optional.of(kyber); + } + case "NTRUKEMExtractor" -> { + var ntru = new NTRU(detectionLocation); + ntru.put(new Decapsulate(detectionLocation)); + yield Optional.of(ntru); + } + case "NTRUKEMGenerator" -> { + var ntru = new NTRU(detectionLocation); + ntru.put(new Encapsulate(detectionLocation)); + yield Optional.of(ntru); + } + case "NTRULPRimeKEMExtractor" -> { + var ntruLP = new NTRULPrime(detectionLocation); + ntruLP.put(new Decapsulate(detectionLocation)); + yield Optional.of(ntruLP); + } + case "NTRULPRimeKEMGenerator" -> { + var ntruLP = new NTRULPrime(detectionLocation); + ntruLP.put(new Encapsulate(detectionLocation)); + yield Optional.of(ntruLP); + } + case "RSAKEMExtractor" -> { + var rsa = new RSAKEM(detectionLocation); + rsa.put(new Decapsulate(detectionLocation)); + yield Optional.of(rsa); + } + case "RSAKEMGenerator" -> { + var rsa = new RSAKEM(detectionLocation); + rsa.put(new Encapsulate(detectionLocation)); + yield Optional.of(rsa); + } + case "SABERKEMExtractor" -> { + var saber = new SABER(detectionLocation); + saber.put(new Decapsulate(detectionLocation)); + yield Optional.of(saber); + } + case "SABERKEMGenerator" -> { + var saber = new SABER(detectionLocation); + saber.put(new Encapsulate(detectionLocation)); + yield Optional.of(saber); + } + case "SNTRUPrimeKEMExtractor" -> { + var sntruPrime = new StreamlinedNTRUPrime(detectionLocation); + sntruPrime.put(new Decapsulate(detectionLocation)); + yield Optional.of(sntruPrime); + } + case "SNTRUPrimeKEMGenerator" -> { + var sntruPrime = new StreamlinedNTRUPrime(detectionLocation); + sntruPrime.put(new Encapsulate(detectionLocation)); + yield Optional.of(sntruPrime); + } default -> { final Algorithm algorithm = new Algorithm( diff --git a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcMacMapper.java b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcMacMapper.java index 2f46f8ff..053c7e71 100644 --- a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcMacMapper.java +++ b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcMacMapper.java @@ -71,7 +71,6 @@ private Optional map( case "CMac", "CMacWithIV" -> Optional.of(new CMAC(detectionLocation)); case "DSTU7564Mac" -> Optional.of(new Kupyna(Mac.class, new Kupyna(detectionLocation))); case "DSTU7624Mac" -> { - /* TODO: what is the "Mac mode" of DSTU7624? It should be appended */ yield Optional.of(new Kalyna(Mac.class, new Kalyna(detectionLocation))); } case "GMac" -> diff --git a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcStreamCipherEngineMapper.java b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcStreamCipherEngineMapper.java index 9991f4ed..7ad5c84f 100644 --- a/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcStreamCipherEngineMapper.java +++ b/mapper/src/main/java/com/ibm/mapper/mapper/bc/BcStreamCipherEngineMapper.java @@ -57,7 +57,6 @@ private Optional map( @Nonnull String streamCipherString, @Nonnull DetectionLocation detectionLocation) { return switch (streamCipherString) { case "ChaCha7539Engine" -> Optional.of(new ChaCha20(detectionLocation)); - /* TODO: in the case below, there is also a constructor alllowing to specify the number X of rounds, which would create a "ChaChaX" instead */ case "ChaChaEngine" -> Optional.of(new ChaCha20(detectionLocation)); case "Grain128Engine" -> Optional.of(new Grain128(detectionLocation)); case "Grainv1Engine" -> Optional.of(new Grainv1(detectionLocation)); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/AES.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/AES.java index f9d34739..47c304f6 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/AES.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/AES.java @@ -33,9 +33,29 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Advanced_Encryption_Standard + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Advanced Encryption Standard + *
  • Rijndael + *
+ */ public final class AES extends Algorithm implements BlockCipher, AuthenticatedEncryption, KeyWrap, Mac { - private static final String NAME = "AES"; // Rijndael + private static final String NAME = "AES"; @Override public @NotNull String asString() { diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX931.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX931.java index e250f504..9fecfd34 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX931.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX931.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.cryptsoft.com/pkcs11doc/v220/group__SEC__12__1__13__ANSI__X9__31__RSA.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ANSIX931 extends Algorithm implements Signature { - // https://www.cryptsoft.com/pkcs11doc/v220/group__SEC__12__1__13__ANSI__X9__31__RSA.html private static final String NAME = "ANSI X9.31"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX942.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX942.java index 1baa159f..b4907894 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX942.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX942.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.cryptsoft.com/pkcs11doc/v220/group__SEC__12__4__14__X9__42__DIFFIE__HELLMAN__KEY__DERIVATION.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ANSIX942 extends Algorithm implements KeyDerivationFunction { - // https://www.cryptsoft.com/pkcs11doc/v220/group__SEC__12__4__14__X9__42__DIFFIE__HELLMAN__KEY__DERIVATION.html private static final String NAME = "ANSI X9.42"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX963.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX963.java index 1bcff7a8..7fbf51b7 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX963.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ANSIX963.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Events/Key-Management-Workshop-2000/documents/x963_overview.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ANSIX963 extends Algorithm implements KeyDerivationFunction { - // https://csrc.nist.gov/CSRC/media/Events/Key-Management-Workshop-2000/documents/x963_overview.pdf private static final String NAME = "ANSI X9.63"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Aria.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Aria.java index bf804b0e..5d97dab8 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Aria.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Aria.java @@ -31,6 +31,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Aria extends Algorithm implements BlockCipher, AuthenticatedEncryption, KeyWrap { private static final String NAME = "Aria"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/BIKE.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/BIKE.java index 15ecb1a1..2ff59186 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/BIKE.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/BIKE.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://hal.science/hal-01671903/document + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class BIKE extends Algorithm implements KeyEncapsulationMechanism { - // https://hal.science/hal-01671903/document private static final String NAME = "BIKE"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Blowfish.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Blowfish.java index 117c36dd..fa1f9009 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Blowfish.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Blowfish.java @@ -31,6 +31,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Blowfish extends Algorithm implements BlockCipher, AuthenticatedEncryption, Mac { private static final String NAME = "Blowfish"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/CMAC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/CMAC.java index d44b26c6..d6f2c1b1 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/CMAC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/CMAC.java @@ -28,8 +28,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/One-key_MAC + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class CMAC extends Algorithm implements Mac { - // https://en.wikipedia.org/wiki/One-key_MAC private static final String NAME = "CMAC"; public CMAC(@NotNull DetectionLocation detectionLocation) { diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ChaCha20.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ChaCha20.java index 169fc658..0a85a07b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ChaCha20.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ChaCha20.java @@ -30,6 +30,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class ChaCha20 extends Algorithm implements StreamCipher { private static final String NAME = "ChaCha20"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ClassicMcEliece.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ClassicMcEliece.java index 9ec3432d..2b702cca 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ClassicMcEliece.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ClassicMcEliece.java @@ -24,10 +24,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://classic.mceliece.org/index.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • CMCE + *
+ */ public final class ClassicMcEliece extends Algorithm implements KeyEncapsulationMechanism { - // https://classic.mceliece.org/index.html - private static final String NAME = "Classic McEliece"; // CMCE + private static final String NAME = "Classic McEliece"; public ClassicMcEliece(@Nonnull DetectionLocation detectionLocation) { super(NAME, KeyEncapsulationMechanism.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ConcatenationKDF.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ConcatenationKDF.java index 445e9b43..a11bdb0b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ConcatenationKDF.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ConcatenationKDF.java @@ -25,9 +25,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 5.8.1.2.1 of + * https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar2.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ConcatenationKDF extends Algorithm implements KeyDerivationFunction { - // See 5.8.1.2.1 of - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar2.pdf private static final String NAME = "ConcatenationKDF"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DES.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DES.java index f9603783..f5f1dfea 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DES.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DES.java @@ -31,8 +31,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Data_Encryption_Standard + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class DES extends Algorithm implements BlockCipher, Mac { - // https://en.wikipedia.org/wiki/Data_Encryption_Standard private static final String NAME = "DES"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DESede.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DESede.java index a6dc231e..aac8dc73 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DESede.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DESede.java @@ -32,10 +32,30 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Triple_DES + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • TripleDES + *
  • 3DES + *
  • TDES + *
+ */ public final class DESede extends Algorithm implements BlockCipher, KeyWrap, Mac { - // https://en.wikipedia.org/wiki/Triple_DES - private static final String NAME = "DESede"; // TripleDES, 3DES, TDES + private static final String NAME = "DESede"; @Override public @NotNull String asString() { diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DH.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DH.java index 7ee68862..f3ce548c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DH.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DH.java @@ -30,8 +30,27 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Diffie Hellman + *
+ */ public final class DH extends Algorithm implements Signature, KeyAgreement, PublicKeyEncryption { - private static final String NAME = "DH"; // DiffieHellman + private static final String NAME = "DH"; @Override public @NotNull String asString() { diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DSTU4145.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DSTU4145.java index 348d4c9e..936faad1 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/DSTU4145.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/DSTU4145.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class DSTU4145 extends Algorithm implements Signature { private static final String NAME = "DSTU 4145-2002"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Dilithium.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Dilithium.java index e38b27d2..2a055c00 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Dilithium.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Dilithium.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://pq-crystals.org/dilithium/ + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Dilithium extends Algorithm implements Signature { - // https://pq-crystals.org/dilithium/ private static final String NAME = "Dilithium"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECCPWD.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECCPWD.java index a15e06b5..30bebc5f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECCPWD.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECCPWD.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class ECCPWD extends Algorithm implements KeyAgreement { private static final String NAME = "ECCPWD"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDH.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDH.java index 7926004e..f87ab5e6 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDH.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDH.java @@ -27,6 +27,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class ECDH extends Algorithm implements KeyAgreement { private static final String NAME = "ECDH"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDSA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDSA.java index cdc4dc76..1d36a161 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDSA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECDSA.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class ECDSA extends Algorithm implements Signature { private static final String NAME = "ECDSA"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECMQV.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECMQV.java index 410d5fa2..42fdf933 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECMQV.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECMQV.java @@ -25,8 +25,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/MQV + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • elliptic curve MQV + *
+ */ public final class ECMQV extends Algorithm implements KeyAgreement { - // https://en.wikipedia.org/wiki/MQV private static final String NAME = "ECMQV"; // elliptic curve MQV diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECNR.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECNR.java new file mode 100644 index 00000000..de77348c --- /dev/null +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ECNR.java @@ -0,0 +1,61 @@ +/* + * SonarQube Cryptography Plugin + * Copyright (C) 2024 IBM + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.ibm.mapper.model.algorithms; + +import com.ibm.mapper.model.Algorithm; +import com.ibm.mapper.model.EllipticCurve; +import com.ibm.mapper.model.Oid; +import com.ibm.mapper.model.Signature; +import com.ibm.mapper.utils.DetectionLocation; +import javax.annotation.Nonnull; + +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ +public final class ECNR extends Algorithm implements Signature { + + private static final String NAME = "EC-NR"; // Elliptic Curve Nyberg-Rueppel, Certicom ECNRA + + public ECNR(@Nonnull DetectionLocation detectionLocation) { + super(NAME, Signature.class, detectionLocation); + this.put(new Oid("2.23.42.9.11.4.2.16", detectionLocation)); + } + + public ECNR( + @Nonnull EllipticCurve ellipticCurve, @Nonnull DetectionLocation detectionLocation) { + this(detectionLocation); + this.put(ellipticCurve); + } +} diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed25519.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed25519.java index db2b9095..c00a6464 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed25519.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed25519.java @@ -25,6 +25,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Ed25519 extends EdDSA implements Signature { private static final String NAME = "Ed25519"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed448.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed448.java index e9feae35..4bc66c45 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed448.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Ed448.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Ed448 extends EdDSA implements Signature { private static final String NAME = "Ed448"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ElGamal.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ElGamal.java index a7249884..c5ef8c14 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ElGamal.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ElGamal.java @@ -27,9 +27,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/ElGamal_encryption + *
  • https://en.wikipedia.org/wiki/ElGamal_signature_scheme + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ElGamal extends Algorithm implements PublicKeyEncryption, Signature { - // https://en.wikipedia.org/wiki/ElGamal_encryption - // https://en.wikipedia.org/wiki/ElGamal_signature_scheme private static final String NAME = "ElGamal"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Falcon.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Falcon.java index be9d2579..0d00bc71 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Falcon.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Falcon.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://falcon-sign.info + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Falcon extends Algorithm implements Signature { - // https://falcon-sign.info private static final String NAME = "Falcon"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Fernet.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Fernet.java index 83c6ff40..b3c1d6c3 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Fernet.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Fernet.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Fernet extends Algorithm implements AuthenticatedEncryption { private static final String NAME = "Fernet"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/FrodoKEM.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/FrodoKEM.java index 39deda28..37133b86 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/FrodoKEM.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/FrodoKEM.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://frodokem.org/files/FrodoKEM-specification-20210604.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class FrodoKEM extends Algorithm implements KeyEncapsulationMechanism { - // https://frodokem.org/files/FrodoKEM-specification-20210604.pdf private static final String NAME = "FrodoKEM"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/GMSS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/GMSS.java index 3687e86c..79c1b4a8 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/GMSS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/GMSS.java @@ -24,10 +24,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://raw.githubusercontent.com/wiki/skunkwerks/swirl/papers/Merkle_Signatures_with_Virtually_Unlimited_Signature_Capacity.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Generalized Merkle Signature Scheme + *
+ */ public class GMSS extends Algorithm implements Signature { - // https://raw.githubusercontent.com/wiki/skunkwerks/swirl/papers/Merkle_Signatures_with_Virtually_Unlimited_Signature_Capacity.pdf - private static final String NAME = "GMSS"; // Generalized Merkle Signature Scheme + private static final String NAME = "GMSS"; public GMSS(@Nonnull DetectionLocation detectionLocation) { super(NAME, Signature.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/GeMSS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/GeMSS.java index e362c25d..759f9f70 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/GeMSS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/GeMSS.java @@ -25,8 +25,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www-polsys.lip6.fr/Links/NIST/GeMSS.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Great Multivariate Short Signature + *
+ */ public class GeMSS extends Algorithm implements Signature { - // https://www-polsys.lip6.fr/Links/NIST/GeMSS.html private static final String NAME = "GeMSS"; // Great Multivariate Short Signature diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HC.java index 1f89fe50..53e9c97f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HC.java @@ -28,9 +28,26 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • HC-256: https://en.wikipedia.org/wiki/HC-256 + *
  • HC-128: https://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class HC extends Algorithm implements StreamCipher { - // HC-256: https://en.wikipedia.org/wiki/HC-256 - // HC-128: https://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf private static final String NAME = "HC"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HKDF.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HKDF.java index 98cb852d..b44819cd 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HKDF.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HKDF.java @@ -27,10 +27,28 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/HKDF + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • RFC 5869 + *
+ */ public final class HKDF extends Algorithm implements KeyDerivationFunction { - // https://en.wikipedia.org/wiki/HKDF - private static final String NAME = "HKDF"; // RFC 5869 + private static final String NAME = "HKDF"; public HKDF(@Nonnull DetectionLocation detectionLocation) { super(NAME, KeyDerivationFunction.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HMAC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HMAC.java index 36f581fa..c1197f69 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HMAC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HMAC.java @@ -27,6 +27,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class HMAC extends Algorithm implements Mac { private static final String NAME = "HMAC"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HQC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HQC.java index 5ae642de..f0fda78b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HQC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HQC.java @@ -26,10 +26,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://pqc-hqc.org/doc/hqc-specification_2023-04-30.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Hamming Quasi-Cyclic + *
+ */ public final class HQC extends Algorithm implements KeyEncapsulationMechanism, PublicKeyEncryption { - // https://pqc-hqc.org/doc/hqc-specification_2023-04-30.pdf - private static final String NAME = "HQC"; // Hamming Quasi-Cyclic + private static final String NAME = "HQC"; /** Returns a more specific name "HQC.KEM" or "HQC.PKE" length */ @Override diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HSS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HSS.java index d8dafe32..f84b010f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HSS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HSS.java @@ -24,10 +24,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.rfc-editor.org/rfc/rfc8708.html#name-hierarchical-signature-syst + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Hierarchical Signature System (RFC 8708) + *
+ */ public class HSS extends Algorithm implements Signature { - // https://www.rfc-editor.org/rfc/rfc8708.html#name-hierarchical-signature-syst - private static final String NAME = "HSS"; // Hierarchical Signature System + private static final String NAME = "HSS"; public HSS(@Nonnull DetectionLocation detectionLocation) { super(NAME, Signature.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HarakaV2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HarakaV2.java index 41bc1761..db64472f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/HarakaV2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/HarakaV2.java @@ -29,8 +29,25 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2016/098.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class HarakaV2 extends Algorithm implements MessageDigest { - // https://eprint.iacr.org/2016/098.pdf private static final String NAME = "Haraka v2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/IDEA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/IDEA.java index 27d4b840..ae6ebdf0 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/IDEA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/IDEA.java @@ -27,9 +27,27 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; -// International Data Encryption Algorithm +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • International Data Encryption Algorithm + *
  • IPES + *
+ */ public final class IDEA extends Algorithm implements BlockCipher { - private static final String NAME = "IDEA"; // IPES + private static final String NAME = "IDEA"; public IDEA(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ISAAC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ISAAC.java index 6b6990c4..23f576e1 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ISAAC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ISAAC.java @@ -27,10 +27,26 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/ISAAC_(cipher) + *
  • https://www.burtleburtle.net/bob/rand/isaacafa.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ISAAC extends Algorithm implements StreamCipher, PseudorandomNumberGenerator { - // https://en.wikipedia.org/wiki/ISAAC_(cipher) - // https://www.burtleburtle.net/bob/rand/isaacafa.html - private static final String NAME = "ISAAC"; public ISAAC(@Nonnull DetectionLocation detectionLocation) { diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF1.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF1.java index 53efa125..6b7e613f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF1.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF1.java @@ -25,8 +25,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 6.2.2 of https://www.shoup.net/iso/std6.pdf (ISO 18033) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • ISO 18033 + *
+ */ public final class KDF1 extends Algorithm implements KeyDerivationFunction { - // See 6.2.2 of https://www.shoup.net/iso/std6.pdf (ISO 18033) private static final String NAME = "KDF1"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF2.java index f116f5d2..923c53c0 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDF2.java @@ -25,9 +25,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 13.2 of https://ieeexplore.ieee.org/document/1335427 (IEEE P1363a) + *
  • See 6.2.3 of https://www.shoup.net/iso/std6.pdf (ISO 18033) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • IEEE P1363a + *
  • ISO 18033 + *
+ */ public final class KDF2 extends Algorithm implements KeyDerivationFunction { - // See 13.2 of https://ieeexplore.ieee.org/document/1335427 (IEEE P1363a) - // See 6.2.3 of https://www.shoup.net/iso/std6.pdf (ISO 18033) private static final String NAME = "KDF2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFCounter.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFCounter.java index f7719027..dda86a4a 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFCounter.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFCounter.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 4.1 in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class KDFCounter extends Algorithm implements KeyDerivationFunction { - // See 4.1 in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf private static final String NAME = "KDF in Counter Mode"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFDoublePipeline.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFDoublePipeline.java index b7fcd70b..7473e512 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFDoublePipeline.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFDoublePipeline.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 4.3 in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class KDFDoublePipeline extends Algorithm implements KeyDerivationFunction { - // See 4.3 in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf private static final String NAME = "KDF in Double-Pipeline Mode"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFFeedback.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFFeedback.java index 03d3266d..4f683946 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFFeedback.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFFeedback.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 4.2 in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class KDFFeedback extends Algorithm implements KeyDerivationFunction { - // See 4.2 in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-108r1-upd1.pdf private static final String NAME = "KDF in Feedback Mode"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFSession.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFSession.java index d86908b7..4073b968 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFSession.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KDFSession.java @@ -25,11 +25,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 4.3.3 of + * https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/TechGuidelines/TR03111/BSI-TR-03111_V-2-1_pdf.pdf?__blob=publicationFile&v=1 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Key Derivation Function for Session Keys + *
+ */ public final class KDFSession extends Algorithm implements KeyDerivationFunction { - // See 4.3.3 of - // https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/TechGuidelines/TR03111/BSI-TR-03111_V-2-1_pdf.pdf?__blob=publicationFile&v=1 - - private static final String NAME = "KDF Session"; // Key Derivation Function for Session Keys + private static final String NAME = "KDF Session"; public KDFSession(@Nonnull DetectionLocation detectionLocation) { super(NAME, KeyDerivationFunction.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KMAC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KMAC.java index 95c8e358..ff589d66 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KMAC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KMAC.java @@ -31,8 +31,25 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.cryptosys.net/manapi/api_kmac.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class KMAC extends Algorithm implements MessageDigest { - // https://www.cryptosys.net/manapi/api_kmac.html private static final String NAME = "KMAC"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kalyna.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kalyna.java index 8b589bfa..5c00850b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kalyna.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kalyna.java @@ -29,11 +29,29 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Kalyna_(cipher) + *
  • https://eprint.iacr.org/2015/650.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • DSTU 7624:2014 + *
+ */ public final class Kalyna extends Algorithm implements BlockCipher, Mac, KeyWrap { - // https://en.wikipedia.org/wiki/Kalyna_(cipher) - // https://eprint.iacr.org/2015/650.pdf - private static final String NAME = "Kalyna"; // DSTU 7624:2014 + private static final String NAME = "Kalyna"; /** * Returns a name of the form "Kalyna-XXX/YYY" where XXX is the block size and YYY is the key diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KangarooTwelve.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KangarooTwelve.java index 41a38a58..8a69540f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/KangarooTwelve.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/KangarooTwelve.java @@ -27,8 +27,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2016/770.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class KangarooTwelve extends Algorithm implements ExtendableOutputFunction { - // https://eprint.iacr.org/2016/770.pdf private static final String NAME = "KangarooTwelve"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Keccak.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Keccak.java index dfb9bc0a..995c6d02 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Keccak.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Keccak.java @@ -26,8 +26,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://keccak.team/keccak.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Keccak extends Algorithm implements MessageDigest, AuthenticatedEncryption { - // https://keccak.team/keccak.html private static final String NAME = "Keccak"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kerberos.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kerberos.java index 09beb295..f04775a4 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kerberos.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kerberos.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Kerberos extends Algorithm implements KeyAgreement { private static final String NAME = "KRB"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kupyna.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kupyna.java index cceac93c..a5163006 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kupyna.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Kupyna.java @@ -30,10 +30,28 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2015/885.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • DSTU 7564:2014 + *
+ */ public final class Kupyna extends Algorithm implements MessageDigest { - // https://eprint.iacr.org/2015/885.pdf - private static final String NAME = "Kupyna"; // DSTU 7564:2014 + private static final String NAME = "Kupyna"; /** Returns a name of the form "Kupyna-XXX" where XXX is the digest size */ @Override diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/LEA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/LEA.java index 0cda99b4..6e7132e7 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/LEA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/LEA.java @@ -30,8 +30,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/LEA_(cipher) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class LEA extends Algorithm implements BlockCipher { - // https://en.wikipedia.org/wiki/LEA_(cipher) private static final String NAME = "LEA"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/LMS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/LMS.java index 2d10e67f..1f8d5e2a 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/LMS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/LMS.java @@ -27,9 +27,26 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; -// Hash Based Signature (HBS) +/** + * + * + *

{@value #NAME}

+ * + *

Hash Based Signature (HBS) + * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2017/349.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + * Hash Based Signature (HBS) + *
+ */ public final class LMS extends Algorithm implements Signature, MessageDigest { - // https://eprint.iacr.org/2017/349.pdf private static final String NAME = "LMS"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD2.java index ef74b900..f8266416 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD2.java @@ -27,6 +27,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class MD2 extends Algorithm implements MessageDigest { private static final String NAME = "MD2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD4.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD4.java index ff136793..4ffce406 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD4.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD4.java @@ -27,6 +27,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class MD4 extends Algorithm implements MessageDigest { private static final String NAME = "MD4"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD5.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD5.java index 4da56bc6..ce3b4e8a 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD5.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MD5.java @@ -27,6 +27,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class MD5 extends Algorithm implements MessageDigest { private static final String NAME = "MD5"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MQV.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MQV.java index d62bff15..6a4d08ee 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MQV.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MQV.java @@ -24,10 +24,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/MQV + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Menezes-Qu-Vanstone + *
+ */ public final class MQV extends Algorithm implements KeyAgreement { - // https://en.wikipedia.org/wiki/MQV - private static final String NAME = "MQV"; // Menezes-Qu-Vanstone + private static final String NAME = "MQV"; public MQV(@Nonnull DetectionLocation detectionLocation) { super(NAME, KeyAgreement.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MarsupilamiFourteen.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MarsupilamiFourteen.java index 4a6b89a1..828249a1 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/MarsupilamiFourteen.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/MarsupilamiFourteen.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2016/770.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class MarsupilamiFourteen extends Algorithm implements MessageDigest { // https://eprint.iacr.org/2016/770.pdf diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/NOEKEON.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/NOEKEON.java index 9de4f5c6..fa2c40bf 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/NOEKEON.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/NOEKEON.java @@ -29,8 +29,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/NOEKEON + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class NOEKEON extends Algorithm implements BlockCipher { - // https://en.wikipedia.org/wiki/NOEKEON private static final String NAME = "NOEKEON"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/NaccacheStern.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/NaccacheStern.java index 54b0b76e..a7c77d92 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/NaccacheStern.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/NaccacheStern.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Naccache–Stern_cryptosystem + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class NaccacheStern extends Algorithm implements PublicKeyEncryption { // https://en.wikipedia.org/wiki/Naccache–Stern_cryptosystem diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF1.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF1.java index 367c884f..65569641 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF1.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF1.java @@ -29,6 +29,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class PBKDF1 extends Algorithm implements PasswordBasedKeyDerivationFunction { private static final String NAME = "PBKDF1"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF2.java index c0c584aa..84f65dd7 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/PBKDF2.java @@ -28,6 +28,24 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class PBKDF2 extends Algorithm implements PasswordBasedKeyDerivationFunction { private static final String NAME = "PBKDF2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/PSK.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/PSK.java index 840afaef..a6f4ca3c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/PSK.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/PSK.java @@ -24,7 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; -// Pre-shared keys +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Pre-shared keys + *
+ */ public final class PSK extends Algorithm implements KeyAgreement { private static final String NAME = "PSK"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ParallelHash.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ParallelHash.java index 55ba322e..db8ca269 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ParallelHash.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ParallelHash.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ParallelHash extends Algorithm implements ExtendableOutputFunction { - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf private static final String NAME = "ParallelHash"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Picnic.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Picnic.java index 2db8308d..ec8c3897 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Picnic.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Picnic.java @@ -25,9 +25,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://microsoft.github.io/Picnic/ + *
  • https://csrc.nist.gov/CSRC/media/Presentations/picnic-round-2-presentation/images-media/picnic-zaverucha.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Picnic extends Algorithm implements Signature { - // https://microsoft.github.io/Picnic/ - // https://csrc.nist.gov/CSRC/media/Presentations/picnic-round-2-presentation/images-media/picnic-zaverucha.pdf private static final String NAME = "Picnic"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Poly1305.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Poly1305.java index 8251fa1c..20363a1c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Poly1305.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Poly1305.java @@ -25,6 +25,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Poly1305 extends Algorithm implements MessageDigest { private static final String NAME = "Poly1305"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/QTESLA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/QTESLA.java index 58c09b44..de5ee2be 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/QTESLA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/QTESLA.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2019/085.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class QTESLA extends Algorithm implements Signature { - // https://eprint.iacr.org/2019/085.pdf private static final String NAME = "qTESLA"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC2.java index 7aaa607c..ac2314be 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC2.java @@ -30,6 +30,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/RC2 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • ARC2 + *
+ */ public final class RC2 extends Algorithm implements BlockCipher, KeyWrap { private static final String NAME = "RC2"; // ARC2 diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC4.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC4.java index e16f8716..ffb55f4a 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC4.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC4.java @@ -29,8 +29,28 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/RC4 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • ARC4 + *
  • ARCFOUR + *
+ */ public final class RC4 extends Algorithm implements StreamCipher { - private static final String NAME = "RC4"; // ARC4, ARCFOUR + private static final String NAME = "RC4"; public RC4(@NotNull DetectionLocation detectionLocation) { super(NAME, StreamCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC5.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC5.java index 85dec268..054b7892 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC5.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC5.java @@ -30,8 +30,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/RC5 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class RC5 extends Algorithm implements BlockCipher, AuthenticatedEncryption { - // https://en.wikipedia.org/wiki/RC5 private static final String NAME = "RC5"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC6.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC6.java index 5076a5d3..4b50ece0 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC6.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RC6.java @@ -31,8 +31,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/RC6 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class RC6 extends Algorithm implements BlockCipher, AuthenticatedEncryption, Mac { - // https://en.wikipedia.org/wiki/RC6 private static final String NAME = "RC6"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RFC3211Wrap.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RFC3211Wrap.java index 8c7fb7e4..a26563ad 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RFC3211Wrap.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RFC3211Wrap.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://datatracker.ietf.org/doc/html/rfc3211#section-2.3.1 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class RFC3211Wrap extends Algorithm implements KeyWrap { - // https://datatracker.ietf.org/doc/html/rfc3211#section-2.3.1 private static final String NAME = "RFC 3211"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RIPEMD.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RIPEMD.java index a6411e92..fd44c38b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RIPEMD.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RIPEMD.java @@ -27,8 +27,25 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/RIPEMD + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class RIPEMD extends Algorithm implements MessageDigest { - // https://en.wikipedia.org/wiki/RIPEMD private static final String NAME = "RIPEMD"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSA.java index 89cebb25..6bc6ff3b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSA.java @@ -35,6 +35,24 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class RSA extends Algorithm implements KeyAgreement, Signature, PublicKeyEncryption { private static final String NAME = "RSA"; private static final String OID = "1.2.840.113549.1.1.1"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAKEM.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAKEM.java index 164d840a..a6452472 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAKEM.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAKEM.java @@ -24,8 +24,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 11.5 of https://www.shoup.net/iso/std6.pdf (ISO 18033) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • ISO 18033 + *
+ */ public final class RSAKEM extends Algorithm implements KeyEncapsulationMechanism { - // See 11.5 of https://www.shoup.net/iso/std6.pdf (ISO 18033) private static final String NAME = "RSA-KEM"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAssaPSS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAssaPSS.java index 18707804..c40edb11 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAssaPSS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/RSAssaPSS.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.cryptosys.net/pki/manpki/pki_rsaschemes.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class RSAssaPSS extends Algorithm implements ProbabilisticSignatureScheme { - // https://www.cryptosys.net/pki/manpki/pki_rsaschemes.html public RSAssaPSS(@NotNull DetectionLocation detectionLocation) { super("RSASSA-PSS", ProbabilisticSignatureScheme.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Rainbow.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Rainbow.java index 773524e6..be8786f2 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Rainbow.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Rainbow.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.pqcrainbow.org + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Rainbow extends Algorithm implements Signature { - // https://www.pqcrainbow.org private static final String NAME = "Rainbow"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SABER.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SABER.java index 3d5498e2..98543966 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SABER.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SABER.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.esat.kuleuven.be/cosic/pqcrypto/saber/ + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class SABER extends Algorithm implements KeyEncapsulationMechanism { - // https://www.esat.kuleuven.be/cosic/pqcrypto/saber/ private static final String NAME = "SABER"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SEED.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SEED.java index fcb21286..147d893d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SEED.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SEED.java @@ -31,8 +31,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/SEED + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class SEED extends Algorithm implements BlockCipher, KeyWrap { - // https://en.wikipedia.org/wiki/SEED private static final String NAME = "SEED"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA2.java index d1e7d255..62045e36 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA2.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class SHA2 extends Algorithm implements MessageDigest { private static final String NAME = "SHA"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA3.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA3.java index f111a3f8..3e430b93 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA3.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SHA3.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class SHA3 extends Algorithm implements MessageDigest { private static final String NAME = "SHA3"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM2.java index ccccbb9b..9e5d2e0f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM2.java @@ -28,8 +28,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://datatracker.ietf.org/doc/html/draft-shen-sm2-ecdsa-02 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class SM2 extends Algorithm implements Signature, PublicKeyEncryption, KeyAgreement { - // https://datatracker.ietf.org/doc/html/draft-shen-sm2-ecdsa-02 private static final String NAME = "SM2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM3.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM3.java index 4e3e708c..846587e3 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM3.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM3.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class SM3 extends Algorithm implements MessageDigest { private static final String NAME = "SM3"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM4.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM4.java index 90a18a22..ec2b0703 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM4.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SM4.java @@ -29,8 +29,26 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • SMS4 + *
+ */ public final class SM4 extends Algorithm implements BlockCipher, AuthenticatedEncryption, Mac { - private static final String NAME = "SM4"; // SMS4 + private static final String NAME = "SM4"; public SM4(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCS.java index b801c72f..c65fbae5 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCS.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2014/795.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class SPHINCS extends Algorithm implements Signature { - // https://eprint.iacr.org/2014/795.pdf private static final String NAME = "SPHINCS"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCSPlus.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCSPlus.java index 255bb309..21ee1a3a 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCSPlus.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SPHINCSPlus.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://sphincs.org + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class SPHINCSPlus extends Algorithm implements Signature { - // https://sphincs.org private static final String NAME = "SPHINCS+"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SRP.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SRP.java index 84b7b79d..56ed7480 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SRP.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SRP.java @@ -24,7 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; -// Secure Remote Password protocol +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Secure Remote Password protocol + *
+ */ public final class SRP extends Algorithm implements KeyAgreement { private static final String NAME = "SRP"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Salsa20.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Salsa20.java index 4db08ddc..f2a4faa3 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Salsa20.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Salsa20.java @@ -27,8 +27,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Salsa20 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Salsa20 extends Algorithm implements StreamCipher { - // https://en.wikipedia.org/wiki/Salsa20 private static final String NAME = "Salsa20"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Scrypt.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Scrypt.java index 0c36c570..3db9118e 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Scrypt.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Scrypt.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Scrypt extends Algorithm implements PasswordBasedKeyDerivationFunction { private static final String NAME = "SCRYPT"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Serpent.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Serpent.java index 17a18f5e..3871ef59 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Serpent.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Serpent.java @@ -30,13 +30,30 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Serpent_(cipher) + *
  • Tnepres (byte swapped version of Serpent): + * https://downloads.bouncycastle.org/java/docs/bcprov-jdk18on-javadoc/org/bouncycastle/crypto/engines/TnepresEngine.html + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Tnepres + *
+ */ public final class Serpent extends Algorithm implements BlockCipher, AuthenticatedEncryption { - // https://en.wikipedia.org/wiki/Serpent_(cipher) - - private static final String NAME = "Serpent"; // Tnepres - // Tnepres is a byte swapped version of Serpent: - // https://downloads.bouncycastle.org/java/docs/bcprov-jdk18on-javadoc/org/bouncycastle/crypto/engines/TnepresEngine.html + private static final String NAME = "Serpent"; public Serpent(@Nonnull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SipHash.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SipHash.java index 68198b56..0e3c3a62 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/SipHash.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/SipHash.java @@ -26,8 +26,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/SipHash + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class SipHash extends Algorithm implements Mac { - // https://en.wikipedia.org/wiki/SipHash private static final String NAME = "SipHash"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skein.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skein.java index 8de24016..80bfee62 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skein.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skein.java @@ -28,8 +28,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Skein_(hash_function) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Skein extends Algorithm implements MessageDigest { - // https://en.wikipedia.org/wiki/Skein_(hash_function) private static final String NAME = "Skein"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skipjack.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skipjack.java index 12c7eaf3..e0282704 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skipjack.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Skipjack.java @@ -30,8 +30,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Skipjack_(cipher) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Skipjack extends Algorithm implements BlockCipher { - // https://en.wikipedia.org/wiki/Skipjack_(cipher) private static final String NAME = "Skipjack"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Threefish.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Threefish.java index 8af2b99c..6d35128e 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Threefish.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Threefish.java @@ -29,8 +29,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Threefish + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Threefish extends Algorithm implements BlockCipher, AuthenticatedEncryption { - // https://en.wikipedia.org/wiki/Threefish private static final String NAME = "Threefish"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Tiger.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Tiger.java index 984a9158..9910011d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Tiger.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Tiger.java @@ -27,9 +27,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Tiger_(hash_function) + *
  • https://iacr.org/archive/asiacrypt2007/48330539/48330539.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Tiger extends Algorithm implements MessageDigest { - // https://en.wikipedia.org/wiki/Tiger_(hash_function) - // https://iacr.org/archive/asiacrypt2007/48330539/48330539.pdf private static final String NAME = "Tiger"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/TripleDES.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/TripleDES.java index c199457f..37ffaf33 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/TripleDES.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/TripleDES.java @@ -30,9 +30,26 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; -// default is EDE mode +/** + * + * + *

{@value #NAME}

+ * + *

Default is EDE mode + * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • TripleDES + *
+ */ public final class TripleDES extends Algorithm implements BlockCipher { - private static final String NAME = "3DES"; // TripleDES + private static final String NAME = "3DES"; public TripleDES(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/TupleHash.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/TupleHash.java index 1c7a3713..e3154000 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/TupleHash.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/TupleHash.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class TupleHash extends Algorithm implements ExtendableOutputFunction { - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf private static final String NAME = "TupleHash"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Twofish.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Twofish.java index 9b5fa4d7..1a64f404 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Twofish.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Twofish.java @@ -31,8 +31,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Twofish + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Twofish extends Algorithm implements BlockCipher, AuthenticatedEncryption, Mac { - // https://en.wikipedia.org/wiki/Twofish private static final String NAME = "Twofish"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Whirlpool.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Whirlpool.java index 509c2971..70dceef8 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Whirlpool.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Whirlpool.java @@ -27,8 +27,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Whirlpool_(hash_function) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Whirlpool extends Algorithm implements MessageDigest { - // https://en.wikipedia.org/wiki/Whirlpool_(hash_function) private static final String NAME = "Whirlpool"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/X25519.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/X25519.java index 64a3600e..52e9b25c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/X25519.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/X25519.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class X25519 extends Algorithm implements KeyAgreement { private static final String NAME = "x25519"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/X448.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/X448.java index 31abbac3..f0a7f040 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/X448.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/X448.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class X448 extends Algorithm implements KeyAgreement { private static final String NAME = "x448"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/XDH.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/XDH.java index e76cb2c0..d1d4d33c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/XDH.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/XDH.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class XDH extends Algorithm implements KeyAgreement { private static final String NAME = "XDH"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSS.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSS.java index 7261614b..41afdd8d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSS.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSS.java @@ -26,12 +26,29 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; -// Hash Based Signature (HBS) +/** + * + * + *

{@value #NAME}

+ * + *

Hash Based Signature (HBS) + * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2017/349.pdf + *
  • https://datatracker.ietf.org/doc/html/rfc8391#section-4.1 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • eXtended Merkle Signature Scheme + *
+ */ public final class XMSS extends Algorithm implements Signature, MessageDigest { - // https://eprint.iacr.org/2017/349.pdf - // https://datatracker.ietf.org/doc/html/rfc8391#section-4.1 - private static final String NAME = "XMSS"; // eXtended Merkle Signature Scheme + private static final String NAME = "XMSS"; public XMSS(@Nonnull DetectionLocation detectionLocation) { this(Signature.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSSMT.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSSMT.java index 52a904c2..b6181b33 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSSMT.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/XMSSMT.java @@ -26,11 +26,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; -// Hash Based Signature (HBS) +/** + * + * + *

{@value #NAME}

+ * + *

Hash Based Signature (HBS) + * + *

Specification

+ * + *
    + *
  • https://datatracker.ietf.org/doc/html/rfc8391#section-4.2 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Multi-Tree XMSS + *
+ */ public final class XMSSMT extends Algorithm implements Signature, MessageDigest { - // https://datatracker.ietf.org/doc/html/rfc8391#section-4.2 - private static final String NAME = "XMSS^MT"; // Multi-Tree XMSS + private static final String NAME = "XMSS^MT"; public XMSSMT(@Nonnull DetectionLocation detectionLocation) { this(Signature.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Xoodyak.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Xoodyak.java index 8db53e50..929c5499 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/Xoodyak.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/Xoodyak.java @@ -28,9 +28,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/xoodyak-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class Xoodyak extends Algorithm implements MessageDigest, StreamCipher, AuthenticatedEncryption { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/xoodyak-spec-final.pdf private static final String NAME = "Xoodyak"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ZUC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ZUC.java index b1aa5024..755b2e81 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ZUC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ZUC.java @@ -29,8 +29,25 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180416526664982687.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class ZUC extends Algorithm implements StreamCipher, Mac { - // http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180416526664982687.pdf private static final String NAME = "ZUC"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon.java index b139f68a..b657ce70 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon.java @@ -27,8 +27,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/ascon-spec-round2.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Ascon extends Algorithm implements BlockCipher { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/ascon-spec-round2.pdf private static final String NAME = "Ascon"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128.java index 6e548816..ec894299 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128.java @@ -27,6 +27,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Ascon128 extends Ascon implements AuthenticatedEncryption { private static final String NAME = "Ascon-128"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128a.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128a.java index 7f24fc18..b88fdddb 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128a.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon128a.java @@ -27,6 +27,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Ascon128a extends Ascon implements AuthenticatedEncryption { private static final String NAME = "Ascon-128a"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon80pq.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon80pq.java index 2dae4ba0..2ab77f5f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon80pq.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/Ascon80pq.java @@ -27,6 +27,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class Ascon80pq extends Ascon implements AuthenticatedEncryption { private static final String NAME = "Ascon-80pq"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconHash.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconHash.java index 89615de4..43d13e20 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconHash.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconHash.java @@ -25,6 +25,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class AsconHash extends Ascon implements MessageDigest { private static final String NAME = "Ascon-Hash"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconXof.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconXof.java index 254ce51f..8bb0a8f4 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconXof.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ascon/AsconXof.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class AsconXof extends Ascon implements ExtendableOutputFunction { private static final String NAME = "Ascon-Xof"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE.java index 19d9ed52..bd5cd2d6 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE.java @@ -26,6 +26,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class BLAKE extends Algorithm implements MessageDigest { private static final String NAME = "BLAKE"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2X.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2X.java index e9633fe8..f8b5e645 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2X.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2X.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class BLAKE2X extends Algorithm implements ExtendableOutputFunction { - // https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2 private static final String NAME = "BLAKE2X"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2b.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2b.java index 73dc05e6..8e308552 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2b.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2b.java @@ -27,8 +27,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.blake2.net/blake2_20130129.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class BLAKE2b extends Algorithm implements MessageDigest { - // https://www.blake2.net/blake2_20130129.pdf private static final String NAME = "BLAKE2b"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2s.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2s.java index 80d54cc5..73a64b7e 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2s.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE2s.java @@ -27,8 +27,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.blake2.net/blake2_20130129.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class BLAKE2s extends Algorithm implements MessageDigest { - // https://www.blake2.net/blake2_20130129.pdf private static final String NAME = "BLAKE2s"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE3.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE3.java index 27d43ecc..b964616f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE3.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/blake/BLAKE3.java @@ -27,8 +27,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class BLAKE3 extends Algorithm implements MessageDigest, KeyDerivationFunction { - // https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf private static final String NAME = "BLAKE3"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST128.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST128.java index da47197a..5e0aa19c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST128.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST128.java @@ -29,10 +29,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/CAST-128 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • CAST5 + *
+ */ public final class CAST128 extends Algorithm implements BlockCipher { - // https://en.wikipedia.org/wiki/CAST-128 - private static final String NAME = "CAST-128"; // CAST5 + private static final String NAME = "CAST-128"; // "128" refers to the maximum size of the key diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST256.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST256.java index ecc86879..32f190c9 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST256.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/cast/CAST256.java @@ -29,10 +29,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/CAST-256 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • CAST6 + *
+ */ public final class CAST256 extends Algorithm implements BlockCipher { - // https://en.wikipedia.org/wiki/CAST-256 - private static final String NAME = "CAST-256"; // CAST6 + private static final String NAME = "CAST-256"; // "256" refers to the maximum size of the key diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Delirium.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Delirium.java index c1ecc6b8..8ad13926 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Delirium.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Delirium.java @@ -24,8 +24,26 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Elephant-Keccak-f[200] + *
+ */ public class Delirium extends Elephant { - private static final String NAME = "Delirium"; // Elephant-Keccak-f[200] + private static final String NAME = "Delirium"; public Delirium(@NotNull DetectionLocation detectionLocation) { super(NAME, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Dumbo.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Dumbo.java index 6e6755dd..60e5561f 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Dumbo.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Dumbo.java @@ -24,8 +24,26 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Elephant-Spongent-π[160] + *
+ */ public class Dumbo extends Elephant { - private static final String NAME = "Dumbo"; // Elephant-Spongent-π[160] + private static final String NAME = "Dumbo"; public Dumbo(@NotNull DetectionLocation detectionLocation) { super(NAME, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Elephant.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Elephant.java index 2a09f9c6..27388e5d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Elephant.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Elephant.java @@ -27,8 +27,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/elephant-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Elephant extends Algorithm implements AuthenticatedEncryption { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/elephant-spec-final.pdf private static final String NAME = "Elephant"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Jumbo.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Jumbo.java index ba4bdc7d..2348c892 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Jumbo.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/elephant/Jumbo.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Elephant-Spongent-π[176] + *
+ */ public class Jumbo extends Elephant { private static final String NAME = "Jumbo"; // Elephant-Spongent-π[176] diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/CryptoPro.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/CryptoPro.java index d96d6df4..6b2268a7 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/CryptoPro.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/CryptoPro.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://datatracker.ietf.org/doc/html/rfc4357#section-6.3 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class CryptoPro extends Algorithm implements KeyWrap { - // https://datatracker.ietf.org/doc/html/rfc4357#section-6.3 private static final String NAME = "CryptoPro"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST28147.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST28147.java index 53e754dc..c56f3b06 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST28147.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST28147.java @@ -32,12 +32,31 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.rfc-editor.org/rfc/rfc5830 + *
  • Key Wrap: https://datatracker.ietf.org/doc/html/rfc4357#section-6.1 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Magma + *
  • GOST 28147-89 (RFC 5830) + *
+ */ public final class GOST28147 extends Algorithm implements BlockCipher, AuthenticatedEncryption, Mac, KeyWrap { - // https://www.rfc-editor.org/rfc/rfc5830 - // Key Wrap: https://datatracker.ietf.org/doc/html/rfc4357#section-6.1 - private static final String NAME = "GOST28147"; // Magma, GOST 28147-89 (RFC 5830) + private static final String NAME = "GOST28147"; public GOST28147(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST341194.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST341194.java index 98255b23..09469501 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST341194.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOST341194.java @@ -26,11 +26,30 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/GOST_(hash_function) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • GOST R 34.11-94 + *
  • GOST 34.311-95 + *
  • Just "GOST" + *
+ */ public final class GOST341194 extends Algorithm implements MessageDigest { - // https://en.wikipedia.org/wiki/GOST_(hash_function) - private static final String NAME = - "GOST341194"; // GOST R 34.11-94, GOST 34.311-95, or just "GOST" + private static final String NAME = "GOST341194"; public GOST341194(@Nonnull DetectionLocation detectionLocation) { super(NAME, MessageDigest.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341012.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341012.java index 56541941..576dbce5 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341012.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341012.java @@ -24,8 +24,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • GOST R 34.10-2012 + *
+ */ public final class GOSTR341012 extends Algorithm implements Signature { - private static final String NAME = "GOSTR341012"; // GOST R 34.10-2012 + private static final String NAME = "GOSTR341012"; public GOSTR341012(@Nonnull DetectionLocation detectionLocation) { super(NAME, Signature.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341094.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341094.java index 46adf2b7..f97133dc 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341094.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341094.java @@ -24,8 +24,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • GOST R 34.10-94 + *
+ */ public final class GOSTR341094 extends Algorithm implements Signature { - private static final String NAME = "GOSTR341094"; // GOST R 34.10-94 + private static final String NAME = "GOSTR341094"; public GOSTR341094(@Nonnull DetectionLocation detectionLocation) { super(NAME, Signature.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341112.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341112.java index 847395ad..88d8b7d6 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341112.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR341112.java @@ -26,8 +26,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Streebog + *
+ */ public final class GOSTR341112 extends Algorithm implements MessageDigest { - private static final String NAME = "GOSTR341112"; // Streebog + private static final String NAME = "GOSTR341112"; public GOSTR341112(@Nonnull DetectionLocation detectionLocation) { super(NAME, MessageDigest.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR34122015.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR34122015.java index 0938204b..0b4fd852 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR34122015.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/gost/GOSTR34122015.java @@ -30,8 +30,26 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Kuznyechik + *
+ */ public final class GOSTR34122015 extends Algorithm implements BlockCipher, AuthenticatedEncryption { - private static final String NAME = "GOSTR34122015"; // Kuznyechik + private static final String NAME = "GOSTR34122015"; public GOSTR34122015(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEAD.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEAD.java index 8d9bc00a..b42501bd 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEAD.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEAD.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/grain-128aead-spec-round2.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Grain128AEAD extends Grain implements AuthenticatedEncryption { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/grain-128aead-spec-round2.pdf private static final String NAME = "Grain-128AEAD"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEADv2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEADv2.java index 578233e8..6d59c629 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEADv2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grain128AEADv2.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/grain-128aead-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Grain128AEADv2 extends Grain implements AuthenticatedEncryption { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/grain-128aead-spec-final.pdf private static final String NAME = "Grain-128AEADv2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grainv0.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grainv0.java index 85c725cd..30e8df27 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grainv0.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/grain/Grainv0.java @@ -25,8 +25,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://www.ecrypt.eu.org/stream/ciphers/grain/grain.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Grainv0 extends Grain { - // https://www.ecrypt.eu.org/stream/ciphers/grain/grain.pdf private static final String NAME = "Grain v0"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/DLIES.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/DLIES.java index d4706c71..8f0d59da 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/DLIES.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/DLIES.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class DLIES extends IES { - // https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme private static final String NAME = "DLIES"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIES.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIES.java index 2684f02e..a71ef1fc 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIES.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIES.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class ECIES extends IES { - // https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme private static final String NAME = "ECIES"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIESKEM.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIESKEM.java index 6a2282e0..0c857aab 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIESKEM.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/ECIESKEM.java @@ -24,8 +24,26 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • See 10.2 of https://www.shoup.net/iso/std6.pdf (ISO 18033) + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • ISO 18033 + *
+ */ public class ECIESKEM extends Algorithm implements KeyEncapsulationMechanism { - // See 10.2 of https://www.shoup.net/iso/std6.pdf (ISO 18033) private static final String NAME = "ECIES-KEM"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/IES.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/IES.java index 6d20301d..d4fcac8c 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/IES.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ies/IES.java @@ -26,8 +26,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class IES extends Algorithm implements PublicKeyEncryption, KeyEncapsulationMechanism { - // https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme private static final String NAME = "IES"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/isap/Isap.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/isap/Isap.java index 5fef5acc..26c6a754 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/isap/Isap.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/isap/Isap.java @@ -29,8 +29,25 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/isap-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class Isap extends Algorithm implements AuthenticatedEncryption { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/isap-spec-final.pdf private static final String NAME = "Isap"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/Kyber.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/Kyber.java index f340e69f..efedbf10 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/Kyber.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/Kyber.java @@ -28,11 +28,29 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://pq-crystals.org/kyber/resources.shtml (details the multiple versions) + *
  • https://en.wikipedia.org/wiki/Kyber + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • This is not ML-KEM + *
+ */ public class Kyber extends Algorithm implements KeyEncapsulationMechanism { - // https://pq-crystals.org/kyber/resources.shtml (details the multiple versions) - // https://en.wikipedia.org/wiki/Kyber - private static final String NAME = "Kyber"; // this is *not* ML-KEM + private static final String NAME = "Kyber"; /** * Returns a name of the form "Kyber-XXX (version YYY)" where XXX is the parameter set identifer diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/MLKEM.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/MLKEM.java index 5c20ed53..6b7a4a84 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/MLKEM.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/kyber/MLKEM.java @@ -27,11 +27,29 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/pubs/fips/203/final + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Module-Lattice-Based Key-Encapsulation + *
  • Standardized version of Kyber + *
+ */ public class MLKEM extends Algorithm implements KeyEncapsulationMechanism { - // https://csrc.nist.gov/pubs/fips/203/final - // This is the standardized version of Kyber - private static final String NAME = "ML-KEM"; // Module-Lattice-Based Key-Encapsulation Mechanism + private static final String NAME = "ML-KEM"; /** Returns a name of the form "ML-KEM-XXX" where XXX is the parameter set identifer */ @Override diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRU.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRU.java index a3ba9722..ef3d079d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRU.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRU.java @@ -24,6 +24,24 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://ntru.org/ + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class NTRU extends Algorithm implements KeyEncapsulationMechanism { // https://ntru.org/ diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRUEncrypt.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRUEncrypt.java index 26ebce48..9e91dba0 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRUEncrypt.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRUEncrypt.java @@ -26,8 +26,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/NTRU + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class NTRUEncrypt extends Algorithm implements PublicKeyEncryption { - // https://en.wikipedia.org/wiki/NTRU private static final String NAME = "NTRUEncrypt"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRULPrime.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRULPrime.java index b1f10dc6..caebdb15 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRULPrime.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/NTRULPrime.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://ntruprime.cr.yp.to/ + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class NTRULPrime extends Algorithm implements KeyEncapsulationMechanism { - // https://ntruprime.cr.yp.to/ private static final String NAME = "NTRU LPrime"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/StreamlinedNTRUPrime.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/StreamlinedNTRUPrime.java index 6703a4b7..12d11671 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/StreamlinedNTRUPrime.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/ntru/StreamlinedNTRUPrime.java @@ -24,8 +24,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://ntruprime.cr.yp.to/ + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class StreamlinedNTRUPrime extends Algorithm implements KeyEncapsulationMechanism { - // https://ntruprime.cr.yp.to/ private static final String NAME = "Streamlined NTRU Prime"; // SNTRUPrime diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleAEAD.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleAEAD.java index e1eb007d..96e7439b 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleAEAD.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleAEAD.java @@ -28,8 +28,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/photon-beetle-spec-round2.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class PhotonBeetleAEAD extends Algorithm implements AuthenticatedEncryption { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/photon-beetle-spec-round2.pdf private static final String NAME = "PHOTON-Beetle-AEAD"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleHash.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleHash.java index 46af5f87..b44d517e 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleHash.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/photonbeetle/PhotonBeetleHash.java @@ -26,8 +26,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/photon-beetle-spec-round2.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public class PhotonBeetleHash extends Algorithm implements MessageDigest { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/photon-beetle-spec-round2.pdf private static final String NAME = "PHOTON-Beetle-Hash"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL1.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL1.java index e3a282f3..a1bc36b6 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL1.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL1.java @@ -30,10 +30,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/SHACAL + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Originally just SHACAL + *
+ */ public final class SHACAL1 extends Algorithm implements BlockCipher, AuthenticatedEncryption { - // https://en.wikipedia.org/wiki/SHACAL - private static final String NAME = "SHACAL-1"; // or originally just SHACAL + private static final String NAME = "SHACAL-1"; public SHACAL1(@Nonnull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL2.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL2.java index b2fcfe41..d2cf2389 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL2.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shacal/SHACAL2.java @@ -30,8 +30,25 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/SHACAL + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class SHACAL2 extends Algorithm implements BlockCipher, AuthenticatedEncryption { - // https://en.wikipedia.org/wiki/SHACAL private static final String NAME = "SHACAL-2"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/CSHAKE.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/CSHAKE.java index 9cdd504f..2676b5a8 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/CSHAKE.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/CSHAKE.java @@ -28,8 +28,26 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • customizable SHAKE + *
+ */ public final class CSHAKE extends Algorithm implements ExtendableOutputFunction { - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf private static final String NAME = "cSHAKE"; // customizable SHAKE diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/SHAKE.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/SHAKE.java index 10a248eb..da416265 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/SHAKE.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/shake/SHAKE.java @@ -28,6 +28,24 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
+ * + *

Other Names and Related Standards

+ * + *
    + * * + *
+ */ public final class SHAKE extends Algorithm implements ExtendableOutputFunction { private static final String NAME = "SHAKE"; diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Esch.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Esch.java index 5a2bfa01..44dac957 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Esch.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Esch.java @@ -29,10 +29,28 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/sparkle-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Part of the Sparkle family + *
+ */ public final class Esch extends Algorithm implements MessageDigest { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/sparkle-spec-final.pdf - private static final String NAME = "Esch"; // from the Sparkle family + private static final String NAME = "Esch"; /** Returns a name of the form "EschXXX" where XXX is the digest size (and capacity) */ @Override diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Schwaemm.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Schwaemm.java index f6c51868..c08537ac 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Schwaemm.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/Schwaemm.java @@ -30,10 +30,28 @@ import java.util.Optional; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/sparkle-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Part of the Sparkle family + *
+ */ public class Schwaemm extends Algorithm implements AuthenticatedEncryption, BlockCipher { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/sparkle-spec-final.pdf - private static final String NAME = "Schwaemm"; // from the Sparkle family + private static final String NAME = "Schwaemm"; /** * Returns a name of the form "SchwaemmXXX-YYY" where XXX is the rate and YYY is the capacity diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/XOEsch.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/XOEsch.java index 7ddda79d..4e416a4d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/XOEsch.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/sparkle/XOEsch.java @@ -25,10 +25,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/sparkle-spec-final.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Part of the Sparkle family + *
+ */ public final class XOEsch extends Algorithm implements MessageDigest { - // https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/sparkle-spec-final.pdf - private static final String NAME = "XOEsch"; // from the Sparkle family + private static final String NAME = "XOEsch"; public XOEsch(@Nonnull DetectionLocation detectionLocation) { super(NAME, MessageDigest.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/TEA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/TEA.java index 26bbe366..f778c4aa 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/TEA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/TEA.java @@ -30,10 +30,28 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Tiny Encryption Algorithm + *
+ */ public final class TEA extends Algorithm implements BlockCipher { - // https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm - private static final String NAME = "TEA"; // Tiny Encryption Algorithm + private static final String NAME = "TEA"; public TEA(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/XTEA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/XTEA.java index 3f71dc27..10fdcc7d 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/XTEA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/tea/XTEA.java @@ -30,10 +30,29 @@ import javax.annotation.Nonnull; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • eXtended Tiny Encryption Algorithm + *
+ */ public final class XTEA extends Algorithm implements BlockCipher { // https://en.wikipedia.org/wiki/XTEA - private static final String NAME = "XTEA"; // Tiny Encryption Algorithm + private static final String NAME = "XTEA"; public XTEA(@NotNull DetectionLocation detectionLocation) { super(NAME, BlockCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPC.java index ef73f3a1..29632736 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPC.java @@ -24,10 +24,28 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://en.wikipedia.org/wiki/Variably_Modified_Permutation_Composition + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • Variably Modified Permutation Composition + *
+ */ public class VMPC extends Algorithm implements StreamCipher { - // https://en.wikipedia.org/wiki/Variably_Modified_Permutation_Composition - private static final String NAME = "VMPC"; // Variably Modified Permutation Composition + private static final String NAME = "VMPC"; public VMPC(@NotNull DetectionLocation detectionLocation) { super(NAME, StreamCipher.class, detectionLocation); diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCKSA.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCKSA.java index 7db7a70a..128b0d10 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCKSA.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCKSA.java @@ -25,10 +25,28 @@ import com.ibm.mapper.utils.DetectionLocation; import javax.annotation.Nonnull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://vmpcfunction.com/cipher.htm#2 + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
  • VMPC Key Scheduling Algorithm + *
+ */ public class VMPCKSA extends Algorithm implements StreamCipher { - // https://vmpcfunction.com/cipher.htm#2 - private static final String NAME = "VMPC-KSA"; // VMPC Key Scheduling Algorithm + private static final String NAME = "VMPC-KSA"; /** Returns a name of the form "VMPC-KSAX" where X is the version */ @Override diff --git a/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCMAC.java b/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCMAC.java index 1a6dd04f..26f2e750 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCMAC.java +++ b/mapper/src/main/java/com/ibm/mapper/model/algorithms/vmpc/VMPCMAC.java @@ -24,11 +24,30 @@ import com.ibm.mapper.utils.DetectionLocation; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@value #NAME}

+ * + *

+ * + *

Specification

+ * + *
    + *
  • https://eprint.iacr.org/2004/301.pdf + *
+ * + *

Other Names and Related Standards

+ * + *
    + *
+ */ public final class VMPCMAC extends Algorithm implements Mac { - // https://eprint.iacr.org/2004/301.pdf + + private static final String NAME = "VMPC-MAC"; public VMPCMAC(@NotNull DetectionLocation detectionLocation) { - super("VMPC-MAC", Mac.class, detectionLocation); + super(NAME, Mac.class, detectionLocation); this.put(new VMPC(detectionLocation)); } } diff --git a/mapper/src/main/java/com/ibm/mapper/model/collections/MergeableCollection.java b/mapper/src/main/java/com/ibm/mapper/model/collections/MergeableCollection.java index f652e9c2..2e0c22c0 100644 --- a/mapper/src/main/java/com/ibm/mapper/model/collections/MergeableCollection.java +++ b/mapper/src/main/java/com/ibm/mapper/model/collections/MergeableCollection.java @@ -32,6 +32,7 @@ *

This differs from the default behavior, in which the root nodes are duplicated to create * multiple trees, each containing one instance of the various {@code MergeableCollection}. */ +// TODO: handle this in the output layer public class MergeableCollection extends AbstractAssetCollection { public MergeableCollection(@NotNull List collection) {