repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCDigestExamples/src/main/java/inflatable_donkey/KeyBlobCurve25519Unwrap.java | package inflatable_donkey;
import java.util.Optional;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.digests.SHA256Digest;
import org.bouncycastle.crypto.engines.AESFastEngine;
import org.bouncycastle.crypto.engines.RFC3394WrapEngine;
import org.bouncycastle.crypto.params.Ke... | 1,722 | 29.767857 | 87 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCDigestExamples/src/main/java/pattern/DigestTest.java | package pattern;
import java.io.File;
import java.io.UnsupportedEncodingException;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA256Digest;
import org.bouncycastle.crypto.digests.SHA512Digest;
public class DigestTest {
public void digestDefaultUsage() throws UnsupportedEncoding... | 2,128 | 30.776119 | 78 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCDigestExamples/src/main/java/fabric_api_archieve/Crypto.java | package fabric_api_archieve;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import org.bouncycastle.asn1.ASN1Integer;
import org.bouncycastle.asn1.DERSequenceGenerator;
import org.bouncycastle.asn1.sec.SECNamedCurves;
import org.bouncycastle.asn1.x9.X9ECParameters;
impo... | 1,732 | 35.87234 | 125 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/OracleExample/src/Crypto/PWHasher.java |
package Crypto;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import java.util.Base64;
/** @author CogniCrypt */
public class PWHasher {
// adopted code from https://github.com/defuse/password-hashing
p... | 1,594 | 29.09434 | 91 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/OracleExample/src/main/java/Crypto/PWHasher.java |
package Crypto;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import java.util.Base64;
/** @author CogniCrypt */
public class PWHasher {
// adopted code from https://github.com/defuse/password-hashing
p... | 1,594 | 29.09434 | 91 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/OracleExample/src/main/java/main/Main.java | package main;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import javax.crypto.BadPaddi... | 4,020 | 32.231405 | 96 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/ConstraintErrorExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("AES/ECB/PKCS5Padding") doe... | 575 | 31 | 143 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/TypestateErrorExample.java | package example;
import java.security.GeneralSecurityException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.Signature;
/**
* This code contains a misuse example CogniCrypt_SAST of a Signature object.
* CogniCrypt_SAST reports that the u... | 1,119 | 31 | 136 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/PredicateMissingExample.java | package example;
import java.security.GeneralSecurityException;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the Cipher instance is initialized (call to init... | 1,200 | 39.033333 | 134 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/IncompleOperationErrorExample.java | package example;
import java.security.GeneralSecurityException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Signature;
import java.security.SignatureException;
import javax.crypto.NoSuchPaddin... | 1,877 | 30.3 | 142 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/fixed/ConstraintErrorExample.java | package example.fixed;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("AES/ECB/PKCS5Padding... | 581 | 31.333333 | 143 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/fixed/TypestateErrorExample.java | package example.fixed;
import java.security.GeneralSecurityException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.Signature;
/**
* This code contains a misuse example CogniCrypt_SAST of a Signature object.
* CogniCrypt_SAST reports that... | 1,123 | 31.114286 | 136 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/fixed/PredicateMissingExample.java | package example.fixed;
import java.security.GeneralSecurityException;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the Cipher instance is initialized (call t... | 1,207 | 39.266667 | 134 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CogniCryptDemoExample/src/main/java/example/fixed/IncompleOperationErrorExample.java | package example.fixed;
import java.security.GeneralSecurityException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Signature;
import java.security.SignatureException;
import javax.crypto.NoSuch... | 1,878 | 30.316667 | 142 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesDESExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("DES") does not correspond ... | 540 | 24.761905 | 125 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesPBEWithMD5AndDESExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("PBEWithMD5AndDES") does no... | 579 | 26.619048 | 138 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesRSAWithCBCExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("RSA/CBC/PKCS1Padding") doe... | 581 | 26.714286 | 142 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesDSAExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("DSA") does not correspond ... | 540 | 24.761905 | 125 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/InitInMacCalledMoreThanOnceExample.java | package example;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
public class InitInMacCalledMoreThanOnceExample {
public static void main(String[] args) ... | 802 | 25.766667 | 94 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesBlowfishWithECBModeExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("Blowfish/ECB/NoPadding") d... | 594 | 27.333333 | 144 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesBlowfishExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("Blowfish") does not corres... | 555 | 25.47619 | 130 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/EmptyArrayUsedForCipherDoFinalExample.java | package example;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.cry... | 989 | 33.137931 | 191 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesNonRandomKeyExample.java | package example;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
impor... | 1,025 | 34.37931 | 221 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MUBenchExamples/src/main/java/example/CipherUsesJustAESExample.java | package example;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
/**
* This code contains a misuse example CogniCrypt_SAST of a Cipher object.
* CogniCrypt_SAST reports that the string argument to Cipher.getInstance("AES") does not correspond ... | 544 | 24.952381 | 125 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCMacExamples/src/main/java/animamea/AmAESCrypto.java | package animamea;
import org.bouncycastle.crypto.BlockCipher;
import org.bouncycastle.crypto.Mac;
import org.bouncycastle.crypto.engines.AESFastEngine;
import org.bouncycastle.crypto.macs.CMac;
import org.bouncycastle.crypto.paddings.ISO7816d4Padding;
import org.bouncycastle.crypto.params.KeyParameter;
import org.boun... | 1,659 | 25.774194 | 126 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCMacExamples/src/main/java/gwt_crypto/SkeinMacTest.java | package gwt_crypto;
import org.bouncycastle.crypto.Mac;
import org.bouncycastle.crypto.macs.SkeinMac;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.util.Arrays;
import org.bouncycastle.util.encoders.Hex;
public class SkeinMacTest {
private byte[] msg = Hex.decode("d3090c72");
private... | 1,268 | 33.297297 | 151 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCMacExamples/src/main/java/gwt_crypto/GMacTest.java | package gwt_crypto;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.Mac;
import org.bouncycastle.crypto.engines.AESFastEngine;
import org.bouncycastle.crypto.macs.GMac;
import org.bouncycastle.crypto.modes.GCMBlockCipher;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bo... | 824 | 33.375 | 78 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCMacExamples/src/main/java/bunkr/PBKDF2Descriptor.java | package bunkr;
import org.bouncycastle.crypto.digests.SHA256Digest;
import org.bouncycastle.crypto.macs.HMac;
public class PBKDF2Descriptor {
public static final int MINIMUM_PBKD2_ITERS = 4096;
public static int calculateRounds(int milliseconds)
{
HMac mac = new HMac(new SHA256Digest());
byte[] state... | 745 | 27.692308 | 89 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCMacExamples/src/main/java/pattern/MacTest.java | package pattern;
import org.bouncycastle.crypto.BlockCipher;
import org.bouncycastle.crypto.Mac;
import org.bouncycastle.crypto.engines.DESEngine;
import org.bouncycastle.crypto.macs.CBCBlockCipherMac;
import org.bouncycastle.crypto.paddings.PKCS7Padding;
import org.bouncycastle.crypto.params.KeyParameter;
import org.... | 1,547 | 29.352941 | 89 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCSymmetricCipherExamples/src/main/java/cbc_aes_example/Main.java | package cbc_aes_example;
import java.security.SecureRandom;
import java.util.Arrays;
import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.engines.AESEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncyca... | 859 | 34.833333 | 96 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCSymmetricCipherExamples/src/main/java/cbc_aes_example/CBCAESBouncyCastle.java | package cbc_aes_example;
import java.security.SecureRandom;
import java.util.Arrays;
import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.engines.AESEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncyca... | 2,583 | 31.708861 | 86 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCSymmetricCipherExamples/src/main/java/gcm_aes_example/GCMAESBouncyCastle.java | package gcm_aes_example;
import java.security.SecureRandom;
import java.util.Arrays;
import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.engines.AESEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncyca... | 2,106 | 37.309091 | 89 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/ecbcrypto/src/main/java/example/ecbcrypto/EcbInSymmCryptoABICase2.java | package example.ecbcrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class EcbInSymmCryptoABICase2 {
public static final St... | 1,158 | 33.088235 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/ecbcrypto/src/main/java/example/ecbcrypto/EcbInSymmCryptoABICase1.java | package example.ecbcrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class EcbInSymmCryptoABICase1 {
public void go(String ... | 893 | 36.25 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/ecbcrypto/src/main/java/example/ecbcrypto/EcbInSymmCryptoCorrected.java | package example.ecbcrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class EcbInSymmCryptoCorrected {
public void go() thro... | 845 | 35.782609 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/ecbcrypto/src/main/java/example/ecbcrypto/EcbInSymmCryptoBBCase1.java | package example.ecbcrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class EcbInSymmCryptoBBCase1 {
public void go() throws... | 840 | 34.041667 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/pbeiteration/src/main/java/example/pbeiteration/LessThan1000IterationPBEABICase2.java | package example.pbeiteration;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
public class LessThan1000IterationPBEABICase2 {
public static final String DEFAULT_COUNT = "20";
private static char[] COUNT;
private static char[] count;
public static void main(){
Less... | 880 | 27.419355 | 91 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/pbeiteration/src/main/java/example/pbeiteration/LessThan1000IterationPBEABICase1.java | package example.pbeiteration;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
public class LessThan1000IterationPBEABICase1 {
public static void main(){
LessThan1000IterationPBEABICase1 lt = new LessThan1000IterationPBEABICase1();
int count = 20;
lt.key2(coun... | 594 | 26.045455 | 85 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/pbeiteration/src/main/java/example/pbeiteration/LessThan1000IterationPBEBBCase1.java | package example.pbeiteration;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
public class LessThan1000IterationPBEBBCase1 {
public static void main(){
LessThan1000IterationPBEBBCase1 lt = new LessThan1000IterationPBEBBCase1();
lt.key2();
}
public void key2(){... | 575 | 27.8 | 83 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/pbeiteration/src/main/java/example/pbeiteration/LessThan1000IterationPBEABHCase1.java | package example.pbeiteration;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
public class LessThan1000IterationPBEABHCase1 {
public static void main(){
LessThan1000IterationPBEABHCase1 lt = new LessThan1000IterationPBEABHCase1(... | 853 | 27.466667 | 85 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablecryptographickey/src/main/java/example/predictablecryptographickey/PredictableCryptographicKeyABHCase2.java | package example.predictablecryptographickey;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class PredictableCryptographicKeyABHCase2 {
public static void main(String [] args) throws UnsupportedEn... | 730 | 28.24 | 81 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablecryptographickey/src/main/java/example/predictablecryptographickey/PredictableCryptographicKeyABHCase1.java | package example.predictablecryptographickey;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.SecureRandom;
import java.util.Arrays;
public class PredictableCryptographicKeyABHCase1 {
public static void main(String [] args) throws UnsupportedEncodingExcepti... | 615 | 33.222222 | 81 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablecryptographickey/src/main/java/example/predictablecryptographickey/PredictableCryptographicKeyBBCase1.java | package example.predictablecryptographickey;
import javax.crypto.spec.SecretKeySpec;
import java.security.SecureRandom;
import java.util.Arrays;
public class PredictableCryptographicKeyBBCase1 {
public static void main(String [] args){
String defaultKey = "defaultkey";
byte[] keyBytes = defaultKey... | 456 | 29.466667 | 67 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablecryptographickey/src/main/java/example/predictablecryptographickey/PredictableCryptographicKeyABICase2.java | package example.predictablecryptographickey;
import javax.crypto.spec.SecretKeySpec;
import java.security.SecureRandom;
import java.util.Arrays;
public class PredictableCryptographicKeyABICase2 {
public static final String DEFAULT_ENCRYPT_KEY = "defaultkey";
private static char[] ENCRYPT_KEY;
private stat... | 818 | 26.3 | 67 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablecryptographickey/src/main/java/example/predictablecryptographickey/PredictableCryptographicKeyABICase1.java | package example.predictablecryptographickey;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.util.Arrays;
public class PredictableCryptographicKeyABICase1 {
public static void main(String [] args){
String key = "defaultkey";
go(key);
}
private static void g... | 501 | 25.421053 | 67 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokenhash/src/main/java/example/brokenhash/BrokenHashABICase5.java | package example.brokenhash;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class BrokenHashABICase5 {
public static final String DEFAULT_CRYPTO = "SHA1";
private static char[] CRYPTO;
private static char[] crypto;
public static void main (String [] args) thro... | 817 | 26.266667 | 78 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokenhash/src/main/java/example/brokenhash/BrokenHashBBCase2.java | package example.brokenhash;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class BrokenHashBBCase2 {
public static void main (String [] args) throws NoSuchAlgorithmException {
String name = "abcdef";
MessageDigest md = MessageDigest.getInstance("MD5");
... | 403 | 27.857143 | 78 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokenhash/src/main/java/example/brokenhash/BrokenHashABICase1.java | package example.brokenhash;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class BrokenHashABICase1 {
public static void main (String [] args) throws NoSuchAlgorithmException {
String str = "abcdef";
String crypto = "SHA1";
go(str,crypto);
}
... | 553 | 29.777778 | 87 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/insecureasymmetriccrypto/src/main/java/example/insecureasymmetriccrypto/InsecureAsymmetricCipherBBCase1.java | package example.insecureasymmetriccrypto;
import javax.crypto.*;
import java.io.IOException;
import java.security.*;
public class InsecureAsymmetricCipherBBCase1 {
public void go() throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IOException, IllegalBlockSizeException, BadPaddingExcep... | 1,346 | 37.485714 | 208 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/insecureasymmetriccrypto/src/main/java/example/insecureasymmetriccrypto/InsecureAsymmetricCipherABICase1.java | package example.insecureasymmetriccrypto;
import javax.crypto.*;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
public class InsecureAsymmetricCipherABICase1 {
public void go(... | 1,491 | 40.444444 | 216 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/insecureasymmetriccrypto/src/main/java/example/insecureasymmetriccrypto/InsecureAsymmetricCipherABICase2.java | package example.insecureasymmetriccrypto;
import javax.crypto.*;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
public class InsecureAsymmetricCipherABICase2 {
public static f... | 1,839 | 37.333333 | 216 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablepbepassword/src/main/java/example/predictablepbepassword/PredictablePBEPasswordABICase1.java | package example.predictablepbepassword;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
public class PredictablePBEPasswordABICase1 {
private PBEKeySpec pbeKeySpec = null;
private PBEParameterSpec pbeParamSpec = null;
public static void m... | 807 | 28.925926 | 90 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablepbepassword/src/main/java/example/predictablepbepassword/PredictablePBEPasswordBBCase2.java | package example.predictablepbepassword;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
public class PredictablePBEPasswordBBCase2 {
private PBEKeySpec pbeKeySpec = null;
private PBEParameterSpec pbeParamSpec = null;
public static void ma... | 768 | 29.76 | 80 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablepbepassword/src/main/java/example/predictablepbepassword/PredictablePBEPasswordABHCase2.java | package example.predictablepbepassword;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
public class PredictablePBEPasswordABHCase2 {
private PBEKeySpec pbeKeySpec = null;
private PBEParameterSpe... | 1,027 | 30.151515 | 85 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/predictablekeystorepassword/src/main/java/example/predictablekeystorepassword/PredictableKeyStorePasswordABICase1.java | package example.predictablekeystorepassword;
import java.io.IOException;
import java.net.URL;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
public class PredictableKeyStorePasswordABICase1 {
URL... | 934 | 36.4 | 130 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticinitializationvector/src/main/java/example/staticinitializationvector/StaticInitializationVectorABHCase1.java | package example.staticinitializationvector;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterExcep... | 1,291 | 40.677419 | 189 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticinitializationvector/src/main/java/example/staticinitializationvector/StaticInitializationVectorABHCase2.java | package example.staticinitializationvector;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyExceptio... | 1,484 | 35.219512 | 159 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticinitializationvector/src/main/java/example/staticinitializationvector/StaticInitializationVectorBBCase1.java | package example.staticinitializationvector;
import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class StaticInitializationVectorBBCase1 {
public vo... | 1,063 | 37 | 159 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticinitializationvector/src/main/java/example/staticinitializationvector/StaticInitializationVectorABICase1.java | package example.staticinitializationvector;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import java.security.*;
public class StaticInitializationVectorABICase1 {
public void go(Iv... | 1,083 | 40.692308 | 159 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticinitializationvector/src/main/java/example/staticinitializationvector/StaticInitializationVectorABICase2.java | package example.staticinitializationvector;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyExceptio... | 1,571 | 40.368421 | 159 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticsalts/src/main/java/example/staticsalts/StaticSaltsABICase2.java | package example.staticsalts;
import javax.crypto.spec.PBEParameterSpec;
public class StaticSaltsABICase2 {
public static final String DEFAULT_SALT = "12345";
private static char[] SALT;
private static char[] salt;
public static void main(String [] args){
StaticSaltsABICase2 cs = new StaticSalt... | 745 | 23.064516 | 96 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticsalts/src/main/java/example/staticsalts/StaticSaltsABHCase1.java | package example.staticsalts;
import javax.crypto.spec.PBEParameterSpec;
import java.util.HashMap;
import java.util.Map;
public class StaticSaltsABHCase1 {
public static void main (String [] args){
StaticSaltsABHCase1 cs = new StaticSaltsABHCase1();
cs.key2();
}
public void key2(){
... | 757 | 26.071429 | 59 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/staticsalts/src/main/java/example/staticsalts/StaticSaltsBBCase1.java | package example.staticsalts;
import javax.crypto.spec.PBEParameterSpec;
public class StaticSaltsBBCase1 {
public static void main (String [] args){
StaticSaltsBBCase1 cs = new StaticSaltsBBCase1();
cs.key2();
}
public void key2(){
PBEParameterSpec pbeParamSpec = null;
byte... | 437 | 23.333333 | 57 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokencrypto/src/main/java/example/brokencrypto/BrokenCryptoABICase2.java | package example.brokencrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class BrokenCryptoABICase2 {
public void doCrypto(S... | 892 | 36.208333 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokencrypto/src/main/java/example/brokencrypto/BrokenCryptoABICase1.java | package example.brokencrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class BrokenCryptoABICase1 {
public void doCrypto(S... | 899 | 36.5 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokencrypto/src/main/java/example/brokencrypto/BrokenCryptoBBCase3.java | package example.brokencrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class BrokenCryptoBBCase3 {
public void go() throws... | 816 | 34.521739 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/CryptoGuardExamples/brokencrypto/src/main/java/example/brokencrypto/BrokenCryptoABICase5.java | package example.brokencrypto;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class BrokenCryptoABICase5 {
public static final St... | 1,164 | 33.264706 | 123 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/crypto/RSAEngineTest.java | package crypto;
import org.bouncycastle.crypto.AsymmetricBlockCipher;
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.engines.RSAEngine;
import org.bouncycastle.crypto.params.RSAKeyParameters;
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters;
import org.bouncyc... | 2,157 | 45.913043 | 202 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/generators/RSAKeyPairGeneratorTest.java | package generators;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import org.bouncycastle.crypto.KeyGenerationParameters;
import org.bouncycastle.crypto.generators.RSAKeyPairGenerator;
import org.bouncycastle.crypto.params.RSAKeyGenerationParameters;
import constants.Constants;
p... | 1,400 | 27.02 | 66 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/rsa_misuse/RSATest.java | package rsa_misuse;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.Security;
import org.bouncycastle.crypto.AsymmetricBlockCipher;
import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.bouncycastle.crypto.InvalidCipherTe... | 2,723 | 30.674419 | 117 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/params/RSAKeyParametersTest.java | package params;
import org.bouncycastle.crypto.params.RSAKeyParameters;
import constants.Constants;
@SuppressWarnings("unused")
public class RSAKeyParametersTest {
public void testOne() {
RSAKeyParameters params = new RSAKeyParameters(
true,
Constants.mod,
Constants.privExp);
}
public void testT... | 437 | 17.25 | 55 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/params/ParametersWithRandomTest.java | package params;
import org.bouncycastle.crypto.params.ParametersWithRandom;
import org.bouncycastle.crypto.params.RSAKeyParameters;
import constants.Constants;
@SuppressWarnings("unused")
public class ParametersWithRandomTest {
public void testOne() {
RSAKeyParameters pubKey = new RSAKeyParameters(false, Cons... | 621 | 27.272727 | 89 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/params/RSAKeyGenerationParametersTest.java | package params;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import org.bouncycastle.crypto.params.RSAKeyGenerationParameters;
import constants.Constants;
@SuppressWarnings("unused")
public class RSAKeyGenerationParametersTest {
public void testOne() throws NoSuchAlgorithmExce... | 530 | 22.086957 | 69 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/params/RSAPrivateCrtKeyParametersTest.java | package params;
import org.bouncycastle.crypto.params.RSAKeyParameters;
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters;
import constants.Constants;
//@SuppressWarnings("unused")
public class RSAPrivateCrtKeyParametersTest {
public void testOne() {
RSAKeyParameters privParameters = new RSAPrivat... | 513 | 21.347826 | 67 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/constants/Constants.java | package constants;
import java.math.BigInteger;
public class Constants {
public static BigInteger publicExponent = new BigInteger("10001", 16);
public static int strength = 768;
public static int certainty = 25;
public static BigInteger mod = new BigInteger("b259d2d6e627a768c94be36164c2d9fc79d97aab9253140e5bf1... | 2,598 | 107.291667 | 331 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCAsymmetricCipherExamples/src/main/java/rsa_nomisuse/RSATest.java | package rsa_nomisuse;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.Security;
import org.bouncycastle.crypto.AsymmetricBlockCipher;
import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.bouncycastle.crypto.InvalidCipher... | 2,684 | 30.588235 | 117 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/Java9ClasspathExample/src/main/java/ConstraintErrorExample.java |
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
public class ConstraintErrorExample {
public static void main(String[] args) {
try {
Cipher instance = Cipher.getInstance("AES/ECB/PKCS5Padding");
} catch (NoSuchAlgorithmException e) {
... | 415 | 18.809524 | 64 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/Bugfixes/issue270/src/main/java/example/Launcher.java | package example;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
public class Launcher {
private KeyFactory keyFactory = KeyFactory.getInstance("ECJ");
public Launcher() throws NoSuchAlgorithmException {
}
public static void main(String [] args){
}
}
| 308 | 18.3125 | 66 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/glassfish-embedded/src/main/java/org/glassfish/grizzly/config/ssl/CustomClass.java | package org.glassfish.grizzly.config.ssl;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretK... | 842 | 35.652174 | 169 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/glassfish-embedded/src/main/java/org/glassfish/grizzly/config/ssl/ConcreteSSL.java | package org.glassfish.grizzly.config.ssl;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import javax.net.ssl.SSLServerSocket;
public class ConcreteSSL extends JSSESocketFactory {
@Override
public void init() throws IOException {
// TODO Auto-generated method stub
}
@... | 1,108 | 22.104167 | 106 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/glassfish-embedded/src/main/java/org/glassfish/grizzly/config/ssl/JSSESocketFactory.java | package org.glassfish.grizzly.config.ssl;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.se... | 8,598 | 29.278169 | 157 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/glassfish-embedded/src/main/java/org/glassfish/grizzly/http/util/StringManager.java | package org.glassfish.grizzly.http.util;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class StringManager
{
private ResourceBundle bundle;
private StringManager(String ... | 3,600 | 23.664384 | 105 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/SSLMisuseExample/src/main/java/crypto/SSLExample.java | package crypto;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.net.ssl.SSLParameters;
public class SSLExample {
public void NoMisuse() throws NoSuchAlgorithmException, No... | 1,715 | 38 | 132 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/ReportFormatExample/src/main/java/MessageDigestExample/MessageDigestExample/Main.java | package MessageDigestExample.MessageDigestExample;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Main {
public static... | 1,232 | 27.022727 | 94 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/StopwatchExample/src/main/java/main/Main.java | package main;
import com.google.common.base.Stopwatch;
public class Main {
private static void correct() {
Stopwatch watch = Stopwatch.createStarted();
watch.isRunning();
watch.stop();
watch.start();
if(watch.isRunning()) {
watch.stop();
}
}
private static void wrong() {
Stopwatch watch = Stopwatc... | 778 | 17.547619 | 48 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/MessageDigestExample/src/main/java/MessageDigestExample/MessageDigestExample/Main.java | package MessageDigestExample.MessageDigestExample;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Main {
public static... | 1,232 | 27.022727 | 94 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/Java9ModuleExample/src/module-info.java |
module org.demo.jpms {
requires java.base;
exports org.demo.jpms;
} | 74 | 7.333333 | 23 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/Java9ModuleExample/src/org/demo/jpms/MainClass.java | package org.demo.jpms;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
public class MainClass {
public static void main(String[] args) {
try {
Cipher instance = Cipher.getInstance("AES/ECB/PKCS5Padding");
} catch (NoSuchAlgorithmExcepti... | 424 | 19.238095 | 64 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/crypto/ECElGamalDecryptorTest.java | package crypto;
import org.bouncycastle.crypto.ec.ECElGamalDecryptor;
import org.bouncycastle.crypto.ec.ECPair;
import org.bouncycastle.math.ec.ECPoint;
import org.bouncycastle.util.encoders.Hex;
import constants.Constants;
@SuppressWarnings("unused")
public class ECElGamalDecryptorTest {
public void testOne(Stri... | 1,381 | 33.55 | 129 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/crypto/ECElGamalEncryptorTest.java | package crypto;
import java.security.SecureRandom;
import org.bouncycastle.crypto.ec.ECElGamalEncryptor;
import org.bouncycastle.crypto.ec.ECPair;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.crypto.params.ParametersWith... | 2,073 | 39.666667 | 131 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/generators/ECKeyPairGeneratorTest.java | package generators;
import java.security.SecureRandom;
import org.bouncycastle.crypto.generators.ECKeyPairGenerator;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECKeyGenerationParameters;
import org.bouncycastle.util.encoders.Hex;
import constants.Constants;
publi... | 1,376 | 29.6 | 100 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/params/ECPublicKeyParametersTest.java | package params;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.math.ec.ECConstants;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.util.enco... | 1,134 | 31.428571 | 115 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/params/ParametersWithRandomTest.java | package params;
import java.security.SecureRandom;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.crypto.params.ParametersWithRandom;
import org.bouncycastle.util.encoders.Hex;
import constants.Constants;
@SuppressWarnin... | 1,578 | 46.848485 | 181 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/params/ECKeyGenerationParametersTest.java | package params;
import java.security.SecureRandom;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECKeyGenerationParameters;
import org.bouncycastle.util.encoders.Hex;
import constants.Constants;
public class ECKeyGenerationParametersTest {
/**
* Correct usage *... | 1,189 | 28.75 | 100 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/params/ECDomainParametersTest.java | package params;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.util.encoders.Hex;
import constants.Constants;
@SuppressWarnings("unused")
public class ECDomainParametersTest {
public void testOne(String point) {
ECDomainParameters params = new ECDomainParameters(Constants.curve,... | 822 | 25.548387 | 70 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/params/ECPrivateKeyParametersTest.java | package params;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
import org.bouncycastle.util.encoders.Hex;
import constants.Constants;
@SuppressWarnings("unused")
public class ECPr... | 1,018 | 28.114286 | 92 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/constants/Constants.java | package constants;
import java.math.BigInteger;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.math.ec.ECConstants;
import org.bouncycastle.math.ec.ECCurve;
imp... | 1,161 | 31.277778 | 101 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/transforms/ECNewRandomessTransformTest.java | package transforms;
import org.bouncycastle.crypto.ec.ECNewRandomnessTransform;
import org.bouncycastle.crypto.ec.ECPair;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.crypto.params.ParametersWithRandom;
import org.bouncyc... | 3,565 | 41.452381 | 163 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/transforms/ECNewPublicKeyTransformTest.java | package transforms;
import org.bouncycastle.crypto.ec.ECNewPublicKeyTransform;
import org.bouncycastle.crypto.ec.ECPair;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.crypto.params.ParametersWithRandom;
import org.bouncyca... | 3,552 | 41.297619 | 163 | java |
CryptoAnalysis | CryptoAnalysis-master/CryptoAnalysisTargets/BCEllipticCurveExamples/src/main/java/transforms/ECFixedTransformTest.java | package transforms;
import org.bouncycastle.crypto.ec.ECFixedTransform;
import org.bouncycastle.crypto.ec.ECPair;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.math.ec.ECPoint;
import org.bouncycastle.util.encoders.Hex;
i... | 3,390 | 36.677778 | 115 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.