# Module: crypto/public_key/elliptic/eddsa_legacy

Implementation of legacy EdDSA following RFC4880bis-03 for OpenPGP. This key type has been deprecated by the crypto-refresh RFC.

Source:
  - crypto/public_key/elliptic/eddsa_legacy.js, line 18

### Methods

#### (async, static) sign(oid, hashAlgo, message, publicKey, privateKey, hashed) → {Promise.<{r: Uint8Array, s: Uint8Array}>}

Sign a message using the provided legacy EdDSA key

##### Parameters:

Name | Type | Description
--- | --- | ---
`oid` | module:type/oid | Elliptic curve object identifier
`hashAlgo` | module:enums.hash | Hash algorithm used to sign (must be sha256 or stronger)
`message` | Uint8Array | Message to sign
`publicKey` | Uint8Array | Public key
`privateKey` | Uint8Array | Private key used to sign the message
`hashed` | Uint8Array | The hashed message

Source:
  - crypto/public_key/elliptic/eddsa_legacy.js, line 43

##### Returns:

Signature of the message

Type
  Promise.<{r: Uint8Array, s: Uint8Array}>

#### (async, static) validateParams(oid, Q, k) → {Promise.<Boolean>}

Validate legacy EdDSA parameters

##### Parameters:

Name | Type | Description
--- | --- | ---
`oid` | module:type/oid | Elliptic curve object identifier
`Q` | Uint8Array | EdDSA public point
`k` | Uint8Array | EdDSA secret seed

Source:
  - crypto/public_key/elliptic/eddsa_legacy.js, line 84

##### Returns:

Whether params are valid.

Type
  Promise.<Boolean>

#### (async, static) verify(oid, hashAlgo, signature, m, publicKey, hashed) → {Boolean}

Verifies if a legacy EdDSA signature is valid for a message

##### Parameters:

Name | Type | Description
--- | --- | ---
`oid` | module:type/oid | Elliptic curve object identifier
`hashAlgo` | module:enums.hash | Hash algorithm used in the signature
`signature` | Object | Signature to verify the message
`m` | Uint8Array | Message to verify
`publicKey` | Uint8Array | Public key used to verify the message
`hashed` | Uint8Array | The hashed message

Source:
  - crypto/public_key/elliptic/eddsa_legacy.js, line 69

##### Returns:

Type
  Boolean