SX_ED448_SZ Macro

C

#define SX_ED448_SZ  57

Description

Size in bytes of a reduced value in ED448 operations

SX_ED448_PT_SZ Macro

C

#define SX_D448_PT_SZ 57

Description

Size in bytes of an encoded ED448 point

SX_ED448_DGST_SZ Macro

C

#define SX_ED448_DGST_SZ  (57 * 2)

Description

Size in bytes of a digest in ED448 operations

sx_ed448_pt Struct

C

struct sx_ed448_pt {
    /** Bytes array representing encoded point for ED448 **/
    char encoded[SX_ED448_PT_SZ];
};

Description

An encoded ED448 point

sx_ed448_v Struct

C

struct sx_ed448_v {
    /** Bytes array representing scalar for ED448 **/
    char bytes[SX_ED448_SZ];
};

Description

A ED448 scalar value

sx_ed448_dgst Struct

C

struct sx_ed448_dgst {
    /** Bytes array of hash digest **/
    char bytes[SX_ED448_DGST_SZ];
};

Description

A hash digest used in the ED448 protocol

SX_ED448_PTMULT

C

typedef int (*FUNC_SX_ED448_PTMULT)(struct sx_pk_cnx *cnx, const struct sx_ed448_dgst *r, struct sx_ed448_pt *pt);
#define SX_ED448_PTMULT         ((FUNC_SX_ED448_PTMULT)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ED448_PTMULT)))

Description

EDDSA point multiplication (ED448) Compute R = r * G, where r is a scalar which can be up to twice the size of the other operands. G is the generator point for the curve. The point R is encoded in pt. When computing the public key, the scalar 'r' is the secret scalar based on the clamped hash digest of the private key.

Parameters

ParamDescription
cnxConnection structure obtained through SX_PK_OPEN() at startup
rSecret scalar based on the clamped hash digest of the private key
ptEncoded resulting R point

See

SX_ASYNC_ED448_PTMULT_GO() and SX_ASYNC_ED448_PTMULT_END() for an asynchronous version

Returns

SX_OK SX_ERR_OUT_OF_RANGE SX_ERR_POINT_NOT_ON_CURVE SX_ERR_INVALID_SIGNATURE SX_ERR_INVALID_PARAM SX_ERR_UNKNOWN_ERROR SX_ERR_BUSY SX_ERR_NOT_IMPLEMENTED SX_ERR_OPERAND_TOO_LARGE SX_ERR_PLATFORM_ERROR SX_ERR_EXPIRED

SX_ASYNC_ED448_PTMULT_GO

C

typedef struct sx_pk_dreq (*FUNC_SX_ASYNC_ED448_PTMULT_GO)(struct sx_pk_cnx *cnx, const struct sx_ed448_dgst *r);
#define SX_ASYNC_ED448_PTMULT_GO         ((FUNC_SX_ASYNC_ED448_PTMULT_GO)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ASYNC_ED448_PTMULT_GO)))

Description

Asynchronous EDDSA point multiplication (ED448) Start an EDDSA point multiplication on the accelerator and return immediately. When the operation finishes on the accelerator, call SX_ASYNC_ED448_PTMULT_END()

Parameters

ParamDescription
cnxConnection structure obtained through SX_PK_OPEN() at startup
rSecret scalar based on the clamped hash digest of the private key

See

SX_ASYNC_ED448_PTMULT_END() and SX_ASYNC_ED448_PTMULT()

Returns

Acquired acceleration request for this operation

SX_ASYNC_ED448_PTMULT_END

C

typedef void (*FUNC_SX_ASYNC_ED448_PTMULT_END)(sx_pk_accel *req, struct sx_ed448_pt *pt);
#define SX_ASYNC_ED448_PTMULT_END         ((FUNC_SX_ASYNC_ED448_PTMULT_END)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ASYNC_ED448_PTMULT_END)))

Description

Collect the result of asynchronous EDDSA point multiplication (ED448) Get the output operands of the EDDSA point multiplication and release the reserved resources. The operation on the accelerator must be finished before calling this function.

Parameters

ParamDescription
reqThe previously acquired acceleration request for this operation
ptEncoded resultiing R point

See

SX_ASYNC_ED448_PTMULT_GO() and SX_ED448_PTMULT()

Returns

None

SX_ED448_SIGN

C

typedef int (*FUNC_SX_ED448_SIGN)(struct sx_pk_cnx *cnx, const struct sx_ed448_dgst *k, const struct sx_ed448_dgst *r, const struct sx_ed448_v *s, struct sx_ed448_v *sig_s);
#define SX_ED448_SIGN         ((FUNC_SX_ED448_SIGN)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ED448_SIGN))))))

Description

Compute signature scalar s for pure EDDSA (ED448). This represents the second step in computing an EDDSA signature. This step computes sig_s : sig_s = (r + k * s) % l

Parameters

ParamDescription
cnxConnection structure obtained through SX_PK_OPEN() at startup
kHash of the encoded point R, the public key and the message. It is interpreted as a scalar with a size double of other operands
rSecret nonce already used in the first signature step
sSecret scalar derived from the private key
sig_sSecond part of EDDSA signature

See

SX_PK_ASYNC_ED448_SIGN_GO() and SX_ASYNC_ED448_SIGN_END() for an asynchronous version

Returns

SX_OK SX_ERR_INVALID_PARAM SX_ERR_UNKNOWN_ERROR SX_ERR_BUSY SX_ERR_NOT_IMPLEMENTED SX_ERR_OPERAND_TOO_LARGE SX_ERR_PLATFORM_ERROR SX_ERR_EXPIRED

SX_PK_ASYNC_ED448_SIGN_GO

C

typedef struct sx_pk_dreq  (*FUNC_SX_PK_ASYNC_ED448_SIGN_GO)(struct sx_pk_cnx *cnx, const struct sx_ed448_dgst *k, const struct sx_ed448_dgst *r, const struct sx_ed448_v *s);
#define SX_PK_ASYNC_ED448_SIGN_GO         ((FUNC_SX_PK_ASYNC_ED448_SIGN_GO)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_PK_ASYNC_ED448_SIGN_GO)))

Description

Asynchronous second part signature generation for pure EDDSA (ED448). Start an ED448 signature generation on the accelerator and return immediately. When the operation finishes on the accelerator, call SX_ASYNC_ED448_SIGN_END()

Parameters

ParamDescription
cnxConnection structure obtained through SX_PK_OPEN() at startup
kHash of the encoded point R, the public key and the message. It is interpreted as a scalar with a size double of other operands
rSecret nonce already used in the first signature step
sSecret scalar derived from the private key

See

SX_ED448_SIGN() and SX_ASYNC_ED448_SIGN_END()

Returns

Acquired acceleration request for this operation

SX_ASYNC_ED448_SIGN_END

C

typedef void (*FUNC_SX_ASYNC_ED448_SIGN_END)(sx_pk_accel *req, struct sx_ed448_v *sig_s);
#define SX_ASYNC_ED448_SIGN_END         ((FUNC_SX_ASYNC_ED448_SIGN_END)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ASYNC_ED448_SIGN_END)))

Description

Collect the result of asynchronous computation of ED448 signature scalar Get the output operands of the ED448 signature generation and release the reserved resources. The operation on the accelerator must be finished before calling this function.

Parameters

ParamDescription
reqThe previously acquired acceleration request for this operation
sig_sSecond part of the ED448 signature

See

SX_PK_ASYNC_ED448_SIGN_GO() and SX_ED448_SIGN()

Returns

None

SX_ED448_VERIFY

C

typedef int (*FUNC_SX_ED448_VERIFY)(struct sx_pk_cnx *cnx, const struct sx_ed448_dgst *k, const struct sx_ed448_pt *a, const struct sx_ed448_v *sig_s, const struct sx_ed448_pt *r);
#define SX_ED448_VERIFY         ((FUNC_SX_ED448_VERIFY)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ED448_VERIFY)))

Description

Verify an EDDSA signature (ED448) It checks if sig_s * G - k * A matches R. sig_s and the encoded point R form the signature. The points A and R are passed in their encoded form via 'a' and 'r'.

Parameters

ParamDescription
cnxConnection structure obtained through SX_PK_OPEN() at startup
kHash of the encoded point R, the public key and the message. It is interpreted as a scalar with a size double of other operands
aEncoded public key
sig_sSecond part of EDDSA signature
rEncoded first part of the signature

See

SX_ASYNC_ED448_VERIFY_GO() for an asynchronous version

Returns

SX_OK SX_ERR_INVALID_PARAM SX_ERR_UNKNOWN_ERROR SX_ERR_BUSY SX_ERR_NOT_IMPLEMENTED SX_ERR_OPERAND_TOO_LARGE SX_ERR_PLATFORM_ERROR SX_ERR_EXPIRED

SX_ED448_VERIFY_GO

C

typedef struct sx_pk_dreq (*FUNC_SX_ASYNC_ED448_VERIFY_GO)(struct sx_pk_cnx *cnx, const struct sx_ed448_dgst *k, const struct sx_ed448_pt *a, const struct sx_ed448_v *sig_s, const struct sx_ed448_pt *r);
#define SX_ASYNC_ED448_VERIFY_GO         ((FUNC_SX_ASYNC_ED448_VERIFY_GO)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_SX_ASYNC_ED448_VERIFY_GO)))

Description

Asynchronous (non-blocking) verify an ED448 signature. Start an ED448 signature generation on the accelerator and return immediately. When the operation finishes on the accelerator, call SX_PK_RELEASE_REQ()

Parameters

ParamDescription
cnxConnection structure obtained through SX_PK_OPEN() at startup
kHash of the encoded point R, the public key and the message. It is interpreted as a scalar with a size double of other operands
aEncoded public key
sig_sSecond part of EDDSA signature
rEncoded first part of the signature

See

SX_ED448_VERIFY()

Returns

Acquired acceleration request for this operation