Class: CryptoSuite_ECDSA_AES

CryptoSuite_ECDSA_AES

The module:api.CryptoSuite implementation for ECDSA, and AES algorithms using software key generation. This class implements a software-based key generation (as opposed to Hardware Security Module based key management)

new CryptoSuite_ECDSA_AES(keySize, hash)

constructor
Parameters:
Name Type Description
keySize number Key size for the ECDSA algorithm, can only be 256 or 384
hash string Optional. Hash algorithm, supported values are "SHA2" and "SHA3"

Methods


decrypt()

This is an implementation of module:api.CryptoSuite#decrypt Decrypts ciphertext using key k. The opts argument should be appropriate for the algorithm used.

deriveKey()

This is an implementation of module:api.CryptoSuite#deriveKey To be implemented

encrypt()

This is an implementation of module:api.CryptoSuite#encrypt Encrypts plaintext using key k. The opts argument should be appropriate for the algorithm used.

generateKey(opts)

This is an implementation of module:api.CryptoSuite#generateKey Returns an instance of module.api.Key representing the private key, which also encapsulates the public key. It'll also save the private key in the KeyValueStore.
Parameters:
Name Type Description
opts object Optional. *
`ephemeral`: {boolean} Optional. If not set, defaults to saving the key. If true, will not save the key.
Returns:
Promise of an instance of module:ECDSA_KEY containing the private key and the public key
Type
Key

getKey()

This is an implementation of module:api.CryptoSuite#getKey Returns the key this CSP associates to the Subject Key Identifier ski.

hash()

This is an implementation of module:api.CryptoSuite#hash Hashes messages msg using options opts.

importKey()

This is an implementation of module:api.CryptoSuite#importKey

setCryptoKeyStore(cryptoKeyStore)

Set the cryptoKeyStore. When the application needs to use a key store other than the default, it should use the Client newCryptoKeyStore to create an instance and use this function to set the instance on the CryptoSuite.
Parameters:
Name Type Description
cryptoKeyStore CryptoKeyStore The cryptoKeyStore.

sign()

This is an implementation of module:api.CryptoSuite#sign Signs digest using key k. The opts argument is not needed.

verify()

This is an implementation of module:api.CryptoSuite#verify Verifies signature against key k and digest The opts argument should be appropriate for the algorithm used.