IPWorks Encrypt 2020 Node.js Edition

Questions / Feedback?

HashEdDSA Property

Whether to use HashEdDSA when signing with an ed25519 or ed448 key.

Syntax

 ecc.getHashEdDSA([callback])
 ecc.setHashEdDSA( hashEdDSA, [callback])

Default Value

FALSE

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getHashEdDSA([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setHashEdDSA([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This setting specifies whether to use the HashEdDSA algorithm when signing and verifying with ed25519 or ed448 keys.

If set to True the class will use the HashEdDSA algorithm (ed25519ph or ed448ph) when signing and verifying. When using a HashEdDSA algorithm the input is pre-hashed and supports a single pass over the data during the signing operation.

If set to False (Default) the class will use the PureEdDSA algorithm (ed25519 or ed448) when signing. The PureEdDSA requires two passes over the input data but provides collision resilience. The collision resilience of PureEdDSA means even if it is feasible to compute collisions for the hash function, the algorithm is still secure.

This property is only applicable when calling Sign and KeyAlgorithm is set to ed25519 or ed448.

If this property is set before calling Sign it must be set before calling VerifySignature.

Data Type

Boolean

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Node.js Edition - Version 20.0 [Build 8155]