Loading...
Searching...
No Matches
scalar.c File Reference

Decaf high-level functions. More...

## Macros

#define | API_NS(_id) decaf_255_##_id
#define | SCALAR_BITS DECAF_255_SCALAR_BITS
#define | SCALAR_SER_BYTES DECAF_255_SCALAR_BYTES
#define | SCALAR_LIMBS DECAF_255_SCALAR_LIMBS
#define | scalar_t API_NS(scalar_t)
#define | WBITS DECAF_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */

## Functions

const scalar_t | API_NS (scalar_one)
const scalar_t | API_NS (scalar_zero)
void API_NS() | scalar_mul (scalar_t out, const scalar_t a, const scalar_t b)
decaf_error_t API_NS() | scalar_invert (scalar_t out, const scalar_t a)
void API_NS() | scalar_sub (scalar_t out, const scalar_t a, const scalar_t b)
void API_NS() | scalar_add (scalar_t out, const scalar_t a, const scalar_t b)
void API_NS() | scalar_set_unsigned (scalar_t out, uint64_t w)
decaf_bool_t API_NS() | scalar_eq (const scalar_t a, const scalar_t b)
decaf_error_t API_NS() | scalar_decode (scalar_t s, const unsigned char ser[SCALAR_SER_BYTES])
void API_NS() | scalar_destroy (scalar_t scalar)
void API_NS() | scalar_decode_long (scalar_t s, const unsigned char *ser, size_t ser_len)
void API_NS() | scalar_encode (unsigned char ser[SCALAR_SER_BYTES], const scalar_t s)
void API_NS() | scalar_cond_sel (scalar_t out, const scalar_t a, const scalar_t b, decaf_bool_t pick_b)
void API_NS() | scalar_halve (scalar_t out, const scalar_t a)

## Detailed Description

Decaf high-level functions.

Author
  Mike Hamburg

Copyright
  Copyright (c) 2015-2016 Cryptography Research, Inc.
  Released under the MIT License. See LICENSE.txt for license information.

Warning
  This file was automatically generated in Python. Please do not edit it.