Debian Codegraph @

src/bindings/crypto_core.h

raw
1 /* Copyright 2017 Donald Stufft and individual contributors
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 static const int PYNACL_HAS_CRYPTO_CORE_ED25519;
17
18 size_t crypto_core_ed25519_bytes();
19 size_t crypto_core_ed25519_scalarbytes(void);
20 size_t crypto_core_ed25519_nonreducedscalarbytes(void);
21
22 int crypto_core_ed25519_is_valid_point(const unsigned char *p);
23 int crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r);
24 int crypto_core_ed25519_add(unsigned char *r, const unsigned char *p, const unsigned char *q);
25 int crypto_core_ed25519_sub(unsigned char *r, const unsigned char *p, const unsigned char *q);
26
27 int crypto_core_ed25519_scalar_invert(unsigned char *recip, const unsigned char *s);
28 void crypto_core_ed25519_scalar_negate(unsigned char *neg, const unsigned char *s);
29 void crypto_core_ed25519_scalar_complement(unsigned char *comp, const unsigned char *s);
30 void crypto_core_ed25519_scalar_add(unsigned char *z, const unsigned char *x,
31 const unsigned char *y);
32 void crypto_core_ed25519_scalar_sub(unsigned char *z, const unsigned char *x,
33 const unsigned char *y);
34 void crypto_core_ed25519_scalar_mul(unsigned char *z, const unsigned char *x,
35 const unsigned char *y);
36 void crypto_core_ed25519_scalar_reduce(unsigned char *r, const unsigned char *s);