nettle  3.7.3
About: Nettle is a low-level cryptographic library.
  Fossies Dox: nettle-3.7.3.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

eddsa-verify.c File Reference
#include <assert.h>
#include "eddsa.h"
#include "eddsa-internal.h"
#include "ecc.h"
#include "ecc-internal.h"
#include "nettle-meta.h"
Include dependency graph for eddsa-verify.c:

Go to the source code of this file.


#define t0   scratch
#define t1   (scratch + p->size)
#define R   scratch
#define sp   (scratch + 2*ecc->p.size)
#define hp   (scratch + 3*ecc->p.size)
#define P   (scratch + 5*ecc->p.size)
#define scratch_out   (scratch + 8*ecc->p.size)
#define S   R
#define hash   ((uint8_t *) P)


static int equal_h (const struct ecc_modulo *p, const mp_limb_t *x1, const mp_limb_t *z1, const mp_limb_t *x2, const mp_limb_t *z2, mp_limb_t *scratch)
mp_size_t _nettle_eddsa_verify_itch (const struct ecc_curve *ecc)
int _nettle_eddsa_verify (const struct ecc_curve *ecc, const struct ecc_eddsa *eddsa, const uint8_t *pub, const mp_limb_t *A, void *ctx, size_t length, const uint8_t *msg, const uint8_t *signature, mp_limb_t *scratch)

Macro Definition Documentation

◆ hash

#define hash   ((uint8_t *) P)

◆ hp

#define hp   (scratch + 3*ecc->p.size)

◆ P

#define P   (scratch + 5*ecc->p.size)

◆ R

#define R   scratch

◆ S

#define S   R

◆ scratch_out

#define scratch_out   (scratch + 8*ecc->p.size)

◆ sp

#define sp   (scratch + 2*ecc->p.size)

◆ t0

#define t0   scratch

◆ t1

#define t1   (scratch + p->size)

Function Documentation

◆ _nettle_eddsa_verify()

int _nettle_eddsa_verify ( const struct ecc_curve ecc,
const struct ecc_eddsa eddsa,
const uint8_t *  pub,
const mp_limb_t A,
void *  ctx,
size_t  length,
const uint8_t *  msg,
const uint8_t *  signature,
mp_limb_t scratch 

◆ _nettle_eddsa_verify_itch()

mp_size_t _nettle_eddsa_verify_itch ( const struct ecc_curve ecc)

◆ equal_h()

static int equal_h ( const struct ecc_modulo p,
const mp_limb_t x1,
const mp_limb_t z1,
const mp_limb_t x2,
const mp_limb_t z2,
mp_limb_t scratch 

Definition at line 48 of file eddsa-verify.c.

References ecc_mod_mul_canonical, mpn_cmp(), ecc_modulo::size, t0, t1, x1, x2, z1, and z2.

Referenced by _nettle_eddsa_verify().