source: EcnlProtoTool/trunk/openssl-1.1.0e/crypto/include/internal/bn_int.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 2.2 KB
Line 
1/*
2 * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#ifndef HEADER_BN_INT_H
11# define HEADER_BN_INT_H
12
13# include <openssl/bn.h>
14# include <limits.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20BIGNUM *bn_wexpand(BIGNUM *a, int words);
21BIGNUM *bn_expand2(BIGNUM *a, int words);
22
23void bn_correct_top(BIGNUM *a);
24
25/*
26 * Determine the modified width-(w+1) Non-Adjacent Form (wNAF) of 'scalar'.
27 * This is an array r[] of values that are either zero or odd with an
28 * absolute value less than 2^w satisfying scalar = \sum_j r[j]*2^j where at
29 * most one of any w+1 consecutive digits is non-zero with the exception that
30 * the most significant digit may be only w-1 zeros away from that next
31 * non-zero digit.
32 */
33signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len);
34
35int bn_get_top(const BIGNUM *a);
36
37void bn_set_top(BIGNUM *a, int top);
38
39int bn_get_dmax(const BIGNUM *a);
40
41/* Set all words to zero */
42void bn_set_all_zero(BIGNUM *a);
43
44/*
45 * Copy the internal BIGNUM words into out which holds size elements (and size
46 * must be bigger than top)
47 */
48int bn_copy_words(BN_ULONG *out, const BIGNUM *in, int size);
49
50BN_ULONG *bn_get_words(const BIGNUM *a);
51
52/*
53 * Set the internal data words in a to point to words which contains size
54 * elements. The BN_FLG_STATIC_DATA flag is set
55 */
56void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size);
57
58/*
59 * Copy words into the BIGNUM |a|, reallocating space as necessary.
60 * The negative flag of |a| is not modified.
61 * Returns 1 on success and 0 on failure.
62 */
63/*
64 * |num_words| is int because bn_expand2 takes an int. This is an internal
65 * function so we simply trust callers not to pass negative values.
66 */
67int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words);
68
69size_t bn_sizeof_BIGNUM(void);
70
71/*
72 * Return element el from an array of BIGNUMs starting at base (required
73 * because callers do not know the size of BIGNUM at compilation time)
74 */
75BIGNUM *bn_array_el(BIGNUM *base, int el);
76
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif
Note: See TracBrowser for help on using the repository browser.