javacard.security.KeyAgreement Java Examples
The following examples show how to use
javacard.security.KeyAgreement.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ECPoint_Helper.java From JCMathLib with MIT License | 5 votes |
public ECPoint_Helper(ResourceManager rm) { super(rm); FLAG_FAST_EC_MULT_VIA_KA = false; // set true only if succesfully allocated and tested below try { //fnc_multiplication_x_keyAgreement = KeyAgreement.getInstance(KeyAgreement.ALG_EC_SVDP_DHC, false); //fnc_SignVerifyECDSA_signEngine = Signature.getInstance(Signature.ALG_ECDSA_SHA, false); //fnc_multiplication_x_keyAgreement = KeyAgreement.getInstance(Consts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY, false); fnc_multiplication_x_keyAgreement = KeyAgreement.getInstance(KeyAgreement_ALG_EC_SVDP_DH_PLAIN, false); fnc_SignVerifyECDSA_signEngine = Signature.getInstance(Signature_ALG_ECDSA_SHA_256, false); FLAG_FAST_EC_MULT_VIA_KA = true; } catch (Exception ignored) { } // Discard any exception }
Example #2
Source File: SECP256k1.java From status-keycard with Apache License 2.0 | 4 votes |
/** * Allocates objects needed by this class. Must be invoked during the applet installation exactly 1 time. */ SECP256k1() { this.ecPointMultiplier = KeyAgreement.getInstance(ALG_EC_SVDP_DH_PLAIN_XY, false); this.tmpECPrivateKey = (ECPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_EC_FP_PRIVATE, SECP256K1_KEY_SIZE, false); setCurveParameters(tmpECPrivateKey); }
Example #3
Source File: AppletUtil.java From ECTester with MIT License | 4 votes |
public static short kaCheck(KeyAgreement keyAgreement) { return nullCheck(keyAgreement, AppletBase.SW_KA_NULL); }