use of snowblossom.proto.WalletKeyPair in project snowblossom by snowblossomcoin.
the class CipherUtilTest method testECCurves.
@Test
public void testECCurves() throws Exception {
for (String curve : SignatureUtil.ALLOWED_ECDSA_CURVES) {
WalletKeyPair wkp = KeyUtil.generateWalletECKey(curve);
testKeys(wkp);
}
}
use of snowblossom.proto.WalletKeyPair in project snowblossom by snowblossomcoin.
the class CipherUtilTest method testECCompressed.
/*@Test
public void testDSA()
throws Exception
{
WalletKeyPair wkp = KeyUtil.generateWalletDSAKey();
testKeys(wkp);
}*/
/*@Test
public void testRSA()
throws Exception
{
WalletKeyPair wkp = KeyUtil.generateWalletRSAKey(1024);
testKeys(wkp);
}*/
@Test
public void testECCompressed() throws Exception {
WalletKeyPair wkp = KeyUtil.generateWalletStandardECKey();
testKeys(wkp);
}
use of snowblossom.proto.WalletKeyPair in project snowblossom by snowblossomcoin.
the class KeyUtilTest method testRSA.
@Test
public void testRSA() throws Exception {
for (int i = 512; i <= 2 * 1024; i *= 2) {
logger.info("Generating key size: " + i);
WalletKeyPair wkp = KeyUtil.generateWalletRSAKey(i);
logger.info(KeyUtil.decomposeASN1Encoded(wkp.getPublicKey()));
logger.info("Testing key size: " + i);
testKeyPair(wkp, "RSA " + i);
}
}
use of snowblossom.proto.WalletKeyPair in project snowblossom by snowblossomcoin.
the class KeyUtilTest method testAllowedCurvesByName.
@Test
public void testAllowedCurvesByName() throws Exception {
ArrayList<String> curves = new ArrayList<>();
curves.add("secp256k1");
curves.add("secp384r1");
curves.add("secp521r1");
curves.add("sect571k1");
curves.add("sect571r1");
for (String curve : curves) {
WalletKeyPair wkp = KeyUtil.generateWalletECKey(curve);
testKeyPair(wkp, curve);
}
}
use of snowblossom.proto.WalletKeyPair in project snowblossom by snowblossomcoin.
the class KeyUtilTest method testDSTU4145.
@Test
public void testDSTU4145() throws Exception {
for (int i = 0; i <= 9; i++) {
logger.info("Testing DSTU key size: " + i);
WalletKeyPair wkp = KeyUtil.generateWalletDSTU4145Key(i);
logger.info(KeyUtil.decomposeASN1Encoded(wkp.getPublicKey()));
testKeyPair(wkp, "DSTU " + i);
}
}
Aggregations