Add build dirs/scripts etc.
This commit is contained in:
parent
2473e19f73
commit
5be35dba6b
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
ecc.h - definitions required for ECC operations using keys
|
||||
defined with sect233r1 / NIST B-233
|
||||
|
||||
Copyright © 2018, 2019 Jbop (https://github.com/jbop1626)
|
||||
|
||||
This file is a part of ninty-233.
|
||||
|
||||
ninty-233 is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ninty-233 is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef NINTY_233_ECC_H
|
||||
#define NINTY_233_ECC_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint32_t element[8];
|
||||
|
||||
typedef struct {
|
||||
element x;
|
||||
element y;
|
||||
} ec_point;
|
||||
|
||||
/*
|
||||
sect233r1 - domain parameters over GF(2^m).
|
||||
Defined in "Standards for Efficient Cryptography 2 (SEC 2)" v2.0, pp. 19-20
|
||||
Not all are currently used.
|
||||
(Actual definitions are in ecc.c)
|
||||
*/
|
||||
extern const element POLY_F;
|
||||
extern const element POLY_R;
|
||||
extern const element A_COEFF;
|
||||
extern const element B_COEFF;
|
||||
extern const element G_X;
|
||||
extern const element G_Y;
|
||||
extern const element G_ORDER; /*
|
||||
extern const uint32_t COFACTOR; */
|
||||
|
||||
/*
|
||||
Printing
|
||||
*/
|
||||
void print_element(const element a);
|
||||
void print_point(const ec_point * a);
|
||||
|
||||
/*
|
||||
Helper functions for working with elements in GF(2^m)
|
||||
*/
|
||||
int gf2m_is_equal(const element a, const element b);
|
||||
void gf2m_set_zero(element a);
|
||||
void gf2m_copy(const element src, element dst);
|
||||
int gf2m_get_bit(const element a, int index);
|
||||
void gf2m_left_shift(element a, int shift);
|
||||
int gf2m_is_one(const element a);
|
||||
int gf2m_degree(const element a);
|
||||
void gf2m_swap(element a, element b);
|
||||
|
||||
/*
|
||||
Arithmetic operations on elements in GF(2^m)
|
||||
*/
|
||||
void gf2m_add(const element a, const element b, element result);
|
||||
void gf2m_inv(const element a, element result);
|
||||
void gf2m_mul(const element a, const element b, element result);
|
||||
void gf2m_div(const element a, const element b, element result);
|
||||
|
||||
/*
|
||||
Operations on points on the elliptic curve
|
||||
y^2 + xy = x^3 + ax^2 + b over GF(2^m)
|
||||
*/
|
||||
void ec_point_copy(const ec_point * src, ec_point * dst);
|
||||
int ec_point_is_equal(const ec_point * a, const ec_point * b);
|
||||
void ec_point_neg(const ec_point * a, ec_point * result);
|
||||
void ec_point_double(const ec_point * a, ec_point * result);
|
||||
void ec_point_add(const ec_point * a, const ec_point * b, ec_point * result);
|
||||
void ec_point_mul(const element a, const ec_point * b, ec_point * result);
|
||||
int ec_point_on_curve(const ec_point * a);
|
||||
|
||||
/*
|
||||
I/O Helpers
|
||||
*/
|
||||
void os_to_elem(const uint8_t * src_os, element dst_elem);
|
||||
void os_to_point(const uint8_t * src_os, ec_point * dst_point);
|
||||
void elem_to_os(const element src_elem, uint8_t * dst_os);
|
||||
void point_to_os(const ec_point * src_point, uint8_t * dst_os);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,298 @@
|
|||
/* mini-gmp, a minimalistic implementation of a GNU GMP subset.
|
||||
|
||||
Copyright 2011-2015 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU MP Library.
|
||||
|
||||
The GNU MP Library is free software; you can redistribute it and/or modify
|
||||
it under the terms of either:
|
||||
|
||||
* the GNU Lesser General Public License as published by the Free
|
||||
Software Foundation; either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
or
|
||||
|
||||
* the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any
|
||||
later version.
|
||||
|
||||
or both in parallel, as here.
|
||||
|
||||
The GNU MP Library is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received copies of the GNU General Public License and the
|
||||
GNU Lesser General Public License along with the GNU MP Library. If not,
|
||||
see https://www.gnu.org/licenses/. */
|
||||
|
||||
/* About mini-gmp: This is a minimal implementation of a subset of the
|
||||
GMP interface. It is intended for inclusion into applications which
|
||||
have modest bignums needs, as a fallback when the real GMP library
|
||||
is not installed.
|
||||
|
||||
This file defines the public interface. */
|
||||
|
||||
#ifndef MINI_GMP_H
|
||||
#define MINI_GMP_H
|
||||
|
||||
/* For size_t */
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void mp_set_memory_functions (void *(*) (size_t),
|
||||
void *(*) (void *, size_t, size_t),
|
||||
void (*) (void *, size_t));
|
||||
|
||||
void mp_get_memory_functions (void *(**) (size_t),
|
||||
void *(**) (void *, size_t, size_t),
|
||||
void (**) (void *, size_t));
|
||||
|
||||
typedef unsigned long mp_limb_t;
|
||||
typedef long mp_size_t;
|
||||
typedef unsigned long mp_bitcnt_t;
|
||||
|
||||
typedef mp_limb_t *mp_ptr;
|
||||
typedef const mp_limb_t *mp_srcptr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int _mp_alloc; /* Number of *limbs* allocated and pointed
|
||||
to by the _mp_d field. */
|
||||
int _mp_size; /* abs(_mp_size) is the number of limbs the
|
||||
last field points to. If _mp_size is
|
||||
negative this is a negative number. */
|
||||
mp_limb_t *_mp_d; /* Pointer to the limbs. */
|
||||
} mpz_struct;
|
||||
|
||||
typedef mpz_struct mpz_t[1];
|
||||
|
||||
typedef mpz_struct *mpz_ptr;
|
||||
typedef const mpz_struct *mpz_srcptr;
|
||||
|
||||
extern const int mp_bits_per_limb;
|
||||
|
||||
void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t);
|
||||
void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t);
|
||||
void mpn_zero (mp_ptr, mp_size_t);
|
||||
|
||||
int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t);
|
||||
int mpn_zero_p (mp_srcptr, mp_size_t);
|
||||
|
||||
mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
|
||||
mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
|
||||
mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
|
||||
|
||||
mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
|
||||
mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
|
||||
mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
|
||||
|
||||
mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
|
||||
mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
|
||||
mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
|
||||
|
||||
mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
|
||||
void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
|
||||
void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t);
|
||||
int mpn_perfect_square_p (mp_srcptr, mp_size_t);
|
||||
mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t);
|
||||
|
||||
mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
|
||||
mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
|
||||
|
||||
mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t);
|
||||
mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t);
|
||||
|
||||
void mpn_com (mp_ptr, mp_srcptr, mp_size_t);
|
||||
mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t);
|
||||
|
||||
mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t);
|
||||
|
||||
mp_limb_t mpn_invert_3by2 (mp_limb_t, mp_limb_t);
|
||||
#define mpn_invert_limb(x) mpn_invert_3by2 ((x), 0)
|
||||
|
||||
size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t);
|
||||
mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int);
|
||||
|
||||
void mpz_init (mpz_t);
|
||||
void mpz_init2 (mpz_t, mp_bitcnt_t);
|
||||
void mpz_clear (mpz_t);
|
||||
|
||||
#define mpz_odd_p(z) (((z)->_mp_size != 0) & (int) (z)->_mp_d[0])
|
||||
#define mpz_even_p(z) (! mpz_odd_p (z))
|
||||
|
||||
int mpz_sgn (const mpz_t);
|
||||
int mpz_cmp_si (const mpz_t, long);
|
||||
int mpz_cmp_ui (const mpz_t, unsigned long);
|
||||
int mpz_cmp (const mpz_t, const mpz_t);
|
||||
int mpz_cmpabs_ui (const mpz_t, unsigned long);
|
||||
int mpz_cmpabs (const mpz_t, const mpz_t);
|
||||
int mpz_cmp_d (const mpz_t, double);
|
||||
int mpz_cmpabs_d (const mpz_t, double);
|
||||
|
||||
void mpz_abs (mpz_t, const mpz_t);
|
||||
void mpz_neg (mpz_t, const mpz_t);
|
||||
void mpz_swap (mpz_t, mpz_t);
|
||||
|
||||
void mpz_add_ui (mpz_t, const mpz_t, unsigned long);
|
||||
void mpz_add (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_sub_ui (mpz_t, const mpz_t, unsigned long);
|
||||
void mpz_ui_sub (mpz_t, unsigned long, const mpz_t);
|
||||
void mpz_sub (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
void mpz_mul_si (mpz_t, const mpz_t, long int);
|
||||
void mpz_mul_ui (mpz_t, const mpz_t, unsigned long int);
|
||||
void mpz_mul (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_mul_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
void mpz_addmul_ui (mpz_t, const mpz_t, unsigned long int);
|
||||
void mpz_addmul (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_submul_ui (mpz_t, const mpz_t, unsigned long int);
|
||||
void mpz_submul (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
void mpz_cdiv_qr (mpz_t, mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_fdiv_qr (mpz_t, mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_tdiv_qr (mpz_t, mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_cdiv_q (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_fdiv_q (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_tdiv_q (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_cdiv_r (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_fdiv_r (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_tdiv_r (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
void mpz_cdiv_q_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
void mpz_fdiv_q_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
void mpz_tdiv_q_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
void mpz_cdiv_r_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
void mpz_fdiv_r_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
void mpz_tdiv_r_2exp (mpz_t, const mpz_t, mp_bitcnt_t);
|
||||
|
||||
void mpz_mod (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
void mpz_divexact (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
int mpz_divisible_p (const mpz_t, const mpz_t);
|
||||
int mpz_congruent_p (const mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
unsigned long mpz_cdiv_qr_ui (mpz_t, mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_fdiv_qr_ui (mpz_t, mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_tdiv_qr_ui (mpz_t, mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_cdiv_q_ui (mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_fdiv_q_ui (mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_tdiv_q_ui (mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_cdiv_r_ui (mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_fdiv_r_ui (mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_tdiv_r_ui (mpz_t, const mpz_t, unsigned long);
|
||||
unsigned long mpz_cdiv_ui (const mpz_t, unsigned long);
|
||||
unsigned long mpz_fdiv_ui (const mpz_t, unsigned long);
|
||||
unsigned long mpz_tdiv_ui (const mpz_t, unsigned long);
|
||||
|
||||
unsigned long mpz_mod_ui (mpz_t, const mpz_t, unsigned long);
|
||||
|
||||
void mpz_divexact_ui (mpz_t, const mpz_t, unsigned long);
|
||||
|
||||
int mpz_divisible_ui_p (const mpz_t, unsigned long);
|
||||
|
||||
unsigned long mpz_gcd_ui (mpz_t, const mpz_t, unsigned long);
|
||||
void mpz_gcd (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_gcdext (mpz_t, mpz_t, mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_lcm_ui (mpz_t, const mpz_t, unsigned long);
|
||||
void mpz_lcm (mpz_t, const mpz_t, const mpz_t);
|
||||
int mpz_invert (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
void mpz_sqrtrem (mpz_t, mpz_t, const mpz_t);
|
||||
void mpz_sqrt (mpz_t, const mpz_t);
|
||||
int mpz_perfect_square_p (const mpz_t);
|
||||
|
||||
void mpz_pow_ui (mpz_t, const mpz_t, unsigned long);
|
||||
void mpz_ui_pow_ui (mpz_t, unsigned long, unsigned long);
|
||||
void mpz_powm (mpz_t, const mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_powm_ui (mpz_t, const mpz_t, unsigned long, const mpz_t);
|
||||
|
||||
void mpz_rootrem (mpz_t, mpz_t, const mpz_t, unsigned long);
|
||||
int mpz_root (mpz_t, const mpz_t, unsigned long);
|
||||
|
||||
void mpz_fac_ui (mpz_t, unsigned long);
|
||||
void mpz_bin_uiui (mpz_t, unsigned long, unsigned long);
|
||||
|
||||
int mpz_probab_prime_p (const mpz_t, int);
|
||||
|
||||
int mpz_tstbit (const mpz_t, mp_bitcnt_t);
|
||||
void mpz_setbit (mpz_t, mp_bitcnt_t);
|
||||
void mpz_clrbit (mpz_t, mp_bitcnt_t);
|
||||
void mpz_combit (mpz_t, mp_bitcnt_t);
|
||||
|
||||
void mpz_com (mpz_t, const mpz_t);
|
||||
void mpz_and (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_ior (mpz_t, const mpz_t, const mpz_t);
|
||||
void mpz_xor (mpz_t, const mpz_t, const mpz_t);
|
||||
|
||||
mp_bitcnt_t mpz_popcount (const mpz_t);
|
||||
mp_bitcnt_t mpz_hamdist (const mpz_t, const mpz_t);
|
||||
mp_bitcnt_t mpz_scan0 (const mpz_t, mp_bitcnt_t);
|
||||
mp_bitcnt_t mpz_scan1 (const mpz_t, mp_bitcnt_t);
|
||||
|
||||
int mpz_fits_slong_p (const mpz_t);
|
||||
int mpz_fits_ulong_p (const mpz_t);
|
||||
long int mpz_get_si (const mpz_t);
|
||||
unsigned long int mpz_get_ui (const mpz_t);
|
||||
double mpz_get_d (const mpz_t);
|
||||
size_t mpz_size (const mpz_t);
|
||||
mp_limb_t mpz_getlimbn (const mpz_t, mp_size_t);
|
||||
|
||||
void mpz_realloc2 (mpz_t, mp_bitcnt_t);
|
||||
mp_srcptr mpz_limbs_read (mpz_srcptr);
|
||||
mp_ptr mpz_limbs_modify (mpz_t, mp_size_t);
|
||||
mp_ptr mpz_limbs_write (mpz_t, mp_size_t);
|
||||
void mpz_limbs_finish (mpz_t, mp_size_t);
|
||||
mpz_srcptr mpz_roinit_n (mpz_t, mp_srcptr, mp_size_t);
|
||||
|
||||
#define MPZ_ROINIT_N(xp, xs) {{0, (xs),(xp) }}
|
||||
|
||||
void mpz_set_si (mpz_t, signed long int);
|
||||
void mpz_set_ui (mpz_t, unsigned long int);
|
||||
void mpz_set (mpz_t, const mpz_t);
|
||||
void mpz_set_d (mpz_t, double);
|
||||
|
||||
void mpz_init_set_si (mpz_t, signed long int);
|
||||
void mpz_init_set_ui (mpz_t, unsigned long int);
|
||||
void mpz_init_set (mpz_t, const mpz_t);
|
||||
void mpz_init_set_d (mpz_t, double);
|
||||
|
||||
size_t mpz_sizeinbase (const mpz_t, int);
|
||||
char *mpz_get_str (char *, int, const mpz_t);
|
||||
int mpz_set_str (mpz_t, const char *, int);
|
||||
int mpz_init_set_str (mpz_t, const char *, int);
|
||||
|
||||
/* This long list taken from gmp.h. */
|
||||
/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4,
|
||||
<iostream> defines EOF but not FILE. */
|
||||
#if defined (FILE) \
|
||||
|| defined (H_STDIO) \
|
||||
|| defined (_H_STDIO) /* AIX */ \
|
||||
|| defined (_STDIO_H) /* glibc, Sun, SCO */ \
|
||||
|| defined (_STDIO_H_) /* BSD, OSF */ \
|
||||
|| defined (__STDIO_H) /* Borland */ \
|
||||
|| defined (__STDIO_H__) /* IRIX */ \
|
||||
|| defined (_STDIO_INCLUDED) /* HPUX */ \
|
||||
|| defined (__dj_include_stdio_h_) /* DJGPP */ \
|
||||
|| defined (_FILE_DEFINED) /* Microsoft */ \
|
||||
|| defined (__STDIO__) /* Apple MPW MrC */ \
|
||||
|| defined (_MSL_STDIO_H) /* Metrowerks */ \
|
||||
|| defined (_STDIO_H_INCLUDED) /* QNX4 */ \
|
||||
|| defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \
|
||||
|| defined (__STDIO_LOADED) /* VMS */
|
||||
size_t mpz_out_str (FILE *, int, const mpz_t);
|
||||
#endif
|
||||
|
||||
void mpz_import (mpz_t, size_t, int, size_t, int, size_t, const void *);
|
||||
void *mpz_export (void *, size_t *, int, size_t, int, size_t, const mpz_t);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* MINI_GMP_H */
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
ninty-233
|
||||
Library for ECC operations using keys defined with
|
||||
sect233r1 / NIST B-233 -- the curve/domain parameters
|
||||
used by Nintendo in the iQue Player and Wii.
|
||||
|
||||
Copyright © 2018, 2019 Jbop (https://github.com/jbop1626)
|
||||
|
||||
This file is a part of ninty-233.
|
||||
|
||||
ninty-233 is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ninty-233 is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef NINTY_233_H
|
||||
#define NINTY_233_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ecc/ecc.h"
|
||||
#include "mini-gmp/mini-gmp.h"
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
Multi-precision integer <--> GF(2^m) element conversions
|
||||
*/
|
||||
void mpz_to_gf2m(const mpz_t src, element dst);
|
||||
void gf2m_to_mpz(const element src, mpz_t dst);
|
||||
|
||||
/*
|
||||
SHA-1 result as multi-precision integer
|
||||
*/
|
||||
#define NOT_IQUE_HASH 0
|
||||
#define IQUE_HASH 1
|
||||
void sha1(const uint8_t * input, uint32_t input_length, unsigned ique_flag, mpz_t hash_out);
|
||||
|
||||
/*
|
||||
ECC algorithms
|
||||
*/
|
||||
void ecdh(const element private_key, const ec_point * public_key, ec_point * shared_secret_output);
|
||||
void ecdsa_sign(const mpz_t hash, const element private_key, element r_out, element s_out);
|
||||
int ecdsa_verify(const mpz_t hash, const ec_point * public_key, const element r_input, const element s_input);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,54 @@
|
|||
MAJOR = 1
|
||||
MINOR = 0
|
||||
PATCH = 0
|
||||
VERSION = .$(MAJOR).$(MINOR).$(PATCH)
|
||||
|
||||
STATIC_LIB = libninty-233.a
|
||||
SHARED_LIB = libninty-233.so
|
||||
|
||||
OUTDIR = ../../bin/linux/
|
||||
ST_OBJDIR = $(OUTDIR)static_obj/
|
||||
SH_OBJDIR = $(OUTDIR)shared_obj/
|
||||
SRCDIR = ../../src/
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -std=c99 -Wall -Wextra -pedantic
|
||||
SONAME = $(SHARED_LIB).$(MAJOR)
|
||||
SH_OBJ = $(SH_OBJDIR)ninty-233.o $(SH_OBJDIR)ecc.o $(SH_OBJDIR)sha1.o $(SH_OBJDIR)mini-gmp.o
|
||||
ST_OBJ = $(ST_OBJDIR)ninty-233.o $(ST_OBJDIR)ecc.o $(ST_OBJDIR)sha1.o $(ST_OBJDIR)mini-gmp.o
|
||||
|
||||
.PHONY: all
|
||||
all: $(STATIC_LIB) $(SHARED_LIB)
|
||||
|
||||
.PHONY: static
|
||||
static: $(STATIC_LIB)
|
||||
|
||||
.PHONY: shared
|
||||
shared: $(SHARED_LIB)
|
||||
|
||||
$(STATIC_LIB): $(ST_OBJ)
|
||||
ar rcs $(OUTDIR)$(STATIC_LIB) $^
|
||||
|
||||
$(SHARED_LIB): $(SH_OBJ)
|
||||
$(CC) -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(SHARED_LIB)$(VERSION) $^
|
||||
|
||||
$(SH_OBJDIR)%.o:
|
||||
@mkdir -p $(SH_OBJDIR)
|
||||
$(CC) $(CFLAGS) -fPIC -c -o $@ $<
|
||||
$(SH_OBJDIR)ninty-233.o: $(SRCDIR)ninty-233.c $(SRCDIR)ninty-233.h $(SRCDIR)ecc/ecc.h $(SRCDIR)sha1/sha1.h $(SRCDIR)mini-gmp/mini-gmp.h
|
||||
$(SH_OBJDIR)ecc.o: $(SRCDIR)ecc/ecc.c $(SRCDIR)ecc/ecc.h
|
||||
$(SH_OBJDIR)sha1.o: $(SRCDIR)sha1/sha1.c $(SRCDIR)sha1/sha1.h
|
||||
$(SH_OBJDIR)mini-gmp.o: $(SRCDIR)mini-gmp/mini-gmp.c $(SRCDIR)mini-gmp/mini-gmp.h
|
||||
|
||||
$(ST_OBJDIR)%.o:
|
||||
@mkdir -p $(ST_OBJDIR)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
$(ST_OBJDIR)ninty-233.o: $(SRCDIR)ninty-233.c $(SRCDIR)ninty-233.h $(SRCDIR)ecc/ecc.h $(SRCDIR)sha1/sha1.h $(SRCDIR)mini-gmp/mini-gmp.h
|
||||
$(ST_OBJDIR)ecc.o: $(SRCDIR)ecc/ecc.c $(SRCDIR)ecc/ecc.h
|
||||
$(ST_OBJDIR)sha1.o: $(SRCDIR)sha1/sha1.c $(SRCDIR)sha1/sha1.h
|
||||
$(ST_OBJDIR)mini-gmp.o: $(SRCDIR)mini-gmp/mini-gmp.c $(SRCDIR)mini-gmp/mini-gmp.h
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(OUTDIR)$(STATIC_LIB) $(OUTDIR)$(SHARED_LIB) $(ST_OBJDIR)*.o $(SH_OBJDIR)*.o
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.12
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ninty-233-static", "ninty-233-static\ninty-233-static.vcxproj", "{026B478D-EEFC-47D5-B139-E49BD902AA6F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ninty-233-dll", "ninty-233-dll\ninty-233-dll.vcxproj", "{F7861F70-0E3A-492D-986D-6DE730767CDD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Debug|x64.Build.0 = Debug|x64
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Debug|x86.Build.0 = Debug|Win32
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Release|x64.ActiveCfg = Release|x64
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Release|x64.Build.0 = Release|x64
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Release|x86.ActiveCfg = Release|Win32
|
||||
{026B478D-EEFC-47D5-B139-E49BD902AA6F}.Release|x86.Build.0 = Release|Win32
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Release|x64.Build.0 = Release|x64
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F7861F70-0E3A-492D-986D-6DE730767CDD}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,159 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{F7861F70-0E3A-492D-986D-6DE730767CDD}</ProjectGuid>
|
||||
<RootNamespace>ninty233dll</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>ninty-233-dll</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_dll\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_dll\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_dll\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_dll\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\src\ecc\ecc.c" />
|
||||
<ClCompile Include="..\..\..\src\mini-gmp\mini-gmp.c" />
|
||||
<ClCompile Include="..\..\..\src\ninty-233.c" />
|
||||
<ClCompile Include="..\..\..\src\sha1\sha1.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\ecc\ecc.h" />
|
||||
<ClInclude Include="..\..\..\src\mini-gmp\mini-gmp.h" />
|
||||
<ClInclude Include="..\..\..\src\ninty-233.h" />
|
||||
<ClInclude Include="..\..\..\src\sha1\sha1.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,156 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{026B478D-EEFC-47D5-B139-E49BD902AA6F}</ProjectGuid>
|
||||
<RootNamespace>ninty233static</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>ninty-233-static</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_static\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_static\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_static\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\bin\msvc\out_static\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\bin\msvc\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<TargetName>ninty-233</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>EnableAllWarnings</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\src\ecc\ecc.c" />
|
||||
<ClCompile Include="..\..\..\src\mini-gmp\mini-gmp.c" />
|
||||
<ClCompile Include="..\..\..\src\ninty-233.c" />
|
||||
<ClCompile Include="..\..\..\src\sha1\sha1.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\ecc\ecc.h" />
|
||||
<ClInclude Include="..\..\..\src\mini-gmp\mini-gmp.h" />
|
||||
<ClInclude Include="..\..\..\src\ninty-233.h" />
|
||||
<ClInclude Include="..\..\..\src\sha1\sha1.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue