23 #ifndef MBEDTLS_BIGNUM_H 24 #define MBEDTLS_BIGNUM_H 26 #if !defined(MBEDTLS_CONFIG_FILE) 29 #include MBEDTLS_CONFIG_FILE 35 #if defined(MBEDTLS_FS_IO) 39 #define MBEDTLS_ERR_MPI_FILE_IO_ERROR -0x0002 40 #define MBEDTLS_ERR_MPI_BAD_INPUT_DATA -0x0004 41 #define MBEDTLS_ERR_MPI_INVALID_CHARACTER -0x0006 42 #define MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -0x0008 43 #define MBEDTLS_ERR_MPI_NEGATIVE_VALUE -0x000A 44 #define MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -0x000C 45 #define MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -0x000E 46 #define MBEDTLS_ERR_MPI_ALLOC_FAILED -0x0010 48 #define MBEDTLS_MPI_CHK(f) do { if( ( ret = f ) != 0 ) goto cleanup; } while( 0 ) 53 #define MBEDTLS_MPI_MAX_LIMBS 10000 55 #if !defined(MBEDTLS_MPI_WINDOW_SIZE) 65 #define MBEDTLS_MPI_WINDOW_SIZE 6 68 #if !defined(MBEDTLS_MPI_MAX_SIZE) 76 #define MBEDTLS_MPI_MAX_SIZE 1024 79 #define MBEDTLS_MPI_MAX_BITS ( 8 * MBEDTLS_MPI_MAX_SIZE ) 99 #define MBEDTLS_MPI_MAX_BITS_SCALE100 ( 100 * MBEDTLS_MPI_MAX_BITS ) 100 #define MBEDTLS_LN_2_DIV_LN_10_SCALE100 332 101 #define MBEDTLS_MPI_RW_BUFFER_SIZE ( ((MBEDTLS_MPI_MAX_BITS_SCALE100 + MBEDTLS_LN_2_DIV_LN_10_SCALE100 - 1) / MBEDTLS_LN_2_DIV_LN_10_SCALE100) + 10 + 6 ) 113 #if !defined(MBEDTLS_HAVE_INT32) 114 #if defined(_MSC_VER) && defined(_M_AMD64) 116 #if !defined(MBEDTLS_HAVE_INT64) 117 #define MBEDTLS_HAVE_INT64 121 #elif defined(__GNUC__) && ( \ 122 defined(__amd64__) || defined(__x86_64__) || \ 123 defined(__ppc64__) || defined(__powerpc64__) || \ 124 defined(__ia64__) || defined(__alpha__) || \ 125 ( defined(__sparc__) && defined(__arch64__) ) || \ 126 defined(__s390x__) || defined(__mips64) ) 127 #if !defined(MBEDTLS_HAVE_INT64) 128 #define MBEDTLS_HAVE_INT64 132 #if !defined(MBEDTLS_NO_UDBL_DIVISION) 135 #define MBEDTLS_HAVE_UDBL 137 #elif defined(__ARMCC_VERSION) && defined(__aarch64__) 142 #if !defined(MBEDTLS_HAVE_INT64) 143 #define MBEDTLS_HAVE_INT64 147 #if !defined(MBEDTLS_NO_UDBL_DIVISION) 150 #define MBEDTLS_HAVE_UDBL 152 #elif defined(MBEDTLS_HAVE_INT64) 159 #if !defined(MBEDTLS_HAVE_INT64) 161 #if !defined(MBEDTLS_HAVE_INT32) 162 #define MBEDTLS_HAVE_INT32 166 #if !defined(MBEDTLS_NO_UDBL_DIVISION) 168 #define MBEDTLS_HAVE_UDBL 374 char *
buf,
size_t buflen,
size_t *olen );
376 #if defined(MBEDTLS_FS_IO) 688 int (*f_rng)(
void *,
unsigned char *,
size_t),
729 int (*f_rng)(
void *,
unsigned char *,
size_t),
747 int (*f_rng)(
void *,
unsigned char *,
size_t),
int mbedtls_mpi_grow(mbedtls_mpi *X, size_t nblimbs)
Enlarge to the specified number of limbs.
Definition: bignum.c:114
int mbedtls_mpi_write_file(const char *p, const mbedtls_mpi *X, int radix, FILE *fout)
Write X into an opened file, or stdout if fout is NULL.
Definition: bignum.c:633
int mbedtls_mpi_div_int(mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, mbedtls_mpi_sint b)
Division by int: A = Q * b + R.
Definition: bignum.c:1437
GLenum mode
Definition: glext.h:6857
GLuint GLfloat * val
Definition: glext.h:7847
int mbedtls_mpi_div_mpi(mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B)
Division by mbedtls_mpi: A = Q * B + R.
Definition: bignum.c:1322
int mbedtls_mpi_add_mpi(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B)
Signed addition: X = A + B.
Definition: bignum.c:1007
#define G(L)
Definition: lstate.h:205
void mbedtls_mpi_free(mbedtls_mpi *X)
Unallocate one MPI.
Definition: bignum.c:95
Configuration options (set of defines)
mbedtls_mpi_uint * p
Definition: bignum.h:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
size_t mbedtls_mpi_bitlen(const mbedtls_mpi *X)
Return the number of bits up to and including the most significant '1' bit'.
Definition: bignum.c:380
Ιστορικό Εικόνα Πληροφορίες Όλοι Οι Χρήστες Χειρίζονται Το Μενού Αριστερό Αναλογικό Αριστερό Αναλογικό Αριστερό Αναλογικό Y Αριστερό Αναλογικό Δεξί Αναλογικό X Δεξί Αναλογικό Δεξί Αναλογικό Y Δεξί Αναλογικό Σκανδάλη Όπλου Όπλο Aux A Όπλο Aux C Όπλο Select Όπλο D pad Κάτω Όπλο D pad Δεξιά Νεκρή Ζώνη Αναλογικού Σύνδεση Όλων Λήξη Χρόνου Σύνδεσης Hide Unbound Core Input Descriptors Κατάλογος Συσκευών Κατάλογος Ποντικιού Duty Cycle Keyboard Gamepad Mapping Enable Κουμπί B(κάτω)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN
GLdouble GLdouble GLdouble r
Definition: glext.h:6406
int mbedtls_mpi_gcd(mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B)
Greatest common divisor: G = gcd(A, B)
Definition: bignum.c:1815
int mbedtls_mpi_lset(mbedtls_mpi *X, mbedtls_mpi_sint z)
Set value from integer.
Definition: bignum.c:290
GLsizeiptr size
Definition: glext.h:6559
int mbedtls_mpi_fill_random(mbedtls_mpi *X, size_t size, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Fill an MPI X with size bytes of random.
Definition: bignum.c:1871
GLdouble s
Definition: glext.h:6390
GLdouble GLdouble z
Definition: glext.h:6514
Unknown compiler Device disconnected from port File already exists Saving to backup buffer Got connection Public address Setting disk in tray You have left the game You have joined with input devices *s *s has joined as player u A netplay connection attempt failed because the peer is not running or is running an old version of RetroArch use the same version use the same version This core does not support inter architecture netplay Incorrect password A netplay client has disconnected You do not have permission to play The input devices requested are not available Netplay peer s paused Give hardware rendered cores their own private context Avoids having to assume hardware state changes inbetween frames Adjusts menu screen appearance settings Improves performance at the cost of latency and more video stuttering Use only if you cannot obtain full speed otherwise Autodetect Capabilities Connecting to port Password Username Accounts List Endpoint Achievements Scan Content Import content Ask Block Frames نظام تشغيل الصوت Audio Enable Turbo Deadzone Audio Maximum Timing Skew Audio Output Dynamic Audio Rate Control الصوت Audio Volume WASAPI Exclusive Mode WASAPI Shared Buffer Length Load Override Files Automatically Load Shader Presets Automatically Confirm Quit Scroll Up Toggle Keyboard Basic menu controls Info Scroll Up Toggle Keyboard Don t overwrite SaveRAM on loading savestate Buildbot Assets URL Allow Camera Cheat Cheat File Load Cheat File Cheat Passes Hardcore Mode Achievement Badges Locked Test Unofficial Achievements Unlocked Verbose Mode Config ملفات التكوين Collections Content Allow to remove entries Downloads Cheats Show core name Authors Core label Permissions System manufacturer Controls Options Start a Core Automatically Buildbot Cores URL Updater CPU Cursor Custom Ratio Database Selection Start directory< Default > Directory not found Disk Cycle Tray Status Disk Index Don t care Download Core DPI Override Enable أنظمة التشغيل Check for Missing Firmware Before Loading Dynamic Backgrounds Menu entry hover color False Favorites Limit Maximum Run Speed Frontend Counters Create game options file مساعدة Changing Virtual Gamepad Overlay مساعدة Scanning For Content History List Enable Horizontal Menu معلومات Analog To Digital Type Left Analog X Left analog Left Analog Y Left analog Y(down)") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
GLuint GLuint GLsizei count
Definition: glext.h:6292
int mbedtls_mpi_copy(mbedtls_mpi *X, const mbedtls_mpi *Y)
Copy the contents of Y into X.
Definition: bignum.c:180
int mbedtls_mpi_cmp_mpi(const mbedtls_mpi *X, const mbedtls_mpi *Y)
Compare signed values.
Definition: bignum.c:838
int mbedtls_mpi_set_bit(mbedtls_mpi *X, size_t pos, unsigned char val)
Set a bit of X to a specific value of 0 or 1.
Definition: bignum.c:319
int mbedtls_mpi_sub_mpi(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B)
Signed subtraction: X = A - B.
Definition: bignum.c:1038
int32_t mbedtls_mpi_sint
Definition: bignum.h:164
void mbedtls_mpi_swap(mbedtls_mpi *X, mbedtls_mpi *Y)
Swap the contents of X and Y.
Definition: bignum.c:214
int mbedtls_mpi_read_file(mbedtls_mpi *X, int radix, FILE *fin)
Read MPI from a line in an opened file.
Definition: bignum.c:600
int mbedtls_mpi_inv_mod(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *N)
Modular inverse: X = A^-1 mod N.
Definition: bignum.c:1891
uint64_t mbedtls_t_udbl
Definition: bignum.h:167
int s
Definition: bignum.h:181
int mbedtls_mpi_read_string(mbedtls_mpi *X, int radix, const char *s)
Import from an ASCII string.
Definition: bignum.c:424
int mbedtls_mpi_get_bit(const mbedtls_mpi *X, size_t pos)
Get a specific bit from X.
Definition: bignum.c:308
int mbedtls_mpi_add_int(mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b)
Signed addition: X = A + b.
Definition: bignum.c:1069
int mbedtls_mpi_safe_cond_swap(mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign)
Safe conditional swap X <-> Y if swap is 1.
Definition: bignum.c:256
int mbedtls_mpi_mod_mpi(mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B)
Modulo: R = A mod B.
Definition: bignum.c:1453
#define A(i)
Definition: ecp_curves.c:884
int mbedtls_mpi_sub_abs(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B)
Unsigned subtraction: X = |A| - |B|.
Definition: bignum.c:964
GLfloat GLfloat p
Definition: glext.h:9809
signed int int32_t
Definition: stdint.h:123
uint32_t mbedtls_mpi_uint
Definition: bignum.h:165
int mbedtls_mpi_shift_r(mbedtls_mpi *X, size_t count)
Right-shift: X >>= count.
Definition: bignum.c:765
int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR)
Sliding-window exponentiation: X = A^E mod N.
Definition: bignum.c:1607
#define FILE
Definition: file_stream_transforms.h:35
void mbedtls_mpi_init(mbedtls_mpi *X)
Initialize one MPI (make internal references valid) This just makes it ready to be set or freed,...
Definition: bignum.c:82
size_t n
Definition: bignum.h:182
MPI structure.
Definition: bignum.h:179
int mbedtls_mpi_mod_int(mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b)
Modulo: r = A mod b.
Definition: bignum.c:1476
int mbedtls_mpi_write_string(const mbedtls_mpi *X, int radix, char *buf, size_t buflen, size_t *olen)
Export into an ASCII string.
Definition: bignum.c:523
int mbedtls_mpi_self_test(int verbose)
Checkup routine.
Definition: bignum.c:2287
size_t mbedtls_mpi_size(const mbedtls_mpi *X)
Return the total size in bytes.
Definition: bignum.c:399
int mbedtls_mpi_safe_cond_assign(mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign)
Safe conditional assignement X = Y if assign is 1.
Definition: bignum.c:228
int mbedtls_mpi_add_abs(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B)
Unsigned addition: X = |A| + |B|.
Definition: bignum.c:887
signed __int64 int64_t
Definition: stdint.h:135
#define X(a, b)
Definition: bba.c:185
int mbedtls_mpi_cmp_abs(const mbedtls_mpi *X, const mbedtls_mpi *Y)
Compare unsigned values.
Definition: bignum.c:808
int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z)
Compare signed values.
Definition: bignum.c:871
int mbedtls_mpi_gen_prime(mbedtls_mpi *X, size_t nbits, int dh_flag, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Prime number generation.
Definition: bignum.c:2182
#define __attribute__(Spec)
Definition: glslang_tab.cpp:647
int mbedtls_mpi_mul_mpi(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B)
Baseline multiplication: X = A * B.
Definition: bignum.c:1173
int mbedtls_mpi_mul_int(mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b)
Baseline multiplication: X = A * b.
Definition: bignum.c:1210
int mbedtls_mpi_read_binary(mbedtls_mpi *X, const unsigned char *buf, size_t buflen)
Import X from unsigned binary data, big endian.
Definition: bignum.c:672
int mbedtls_mpi_write_binary(const mbedtls_mpi *X, unsigned char *buf, size_t buflen)
Export X into unsigned binary data, big endian. Always fills the whole buffer, which will start with ...
Definition: bignum.c:695
unsigned __int64 uint64_t
Definition: stdint.h:136
int mbedtls_mpi_shrink(mbedtls_mpi *X, size_t nblimbs)
Resize down, keeping at least the specified number of limbs.
Definition: bignum.c:144
unsigned int uint32_t
Definition: stdint.h:126
int mbedtls_mpi_sub_int(mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b)
Signed subtraction: X = A - b.
Definition: bignum.c:1085
int mbedtls_mpi_is_prime(const mbedtls_mpi *X, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Miller-Rabin primality test.
Definition: bignum.c:2150
size_t mbedtls_mpi_lsb(const mbedtls_mpi *X)
Return the number of zero-bits before the least significant '1' bit.
Definition: bignum.c:347
int mbedtls_mpi_shift_l(mbedtls_mpi *X, size_t count)
Left-shift: X <<= count.
Definition: bignum.c:715