mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Added my name to the copyright
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@42 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
parent
3c59f849dd
commit
d521a68821
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This license is free software; you can redistribute it and/or modify
|
# This license is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
'
|
'
|
||||||
' Copyright(C) 2006
|
' Copyright(C) 2006 Cameron Rich
|
||||||
'
|
'
|
||||||
' This program is free software you can redistribute it and/or modify
|
' This program is free software you can redistribute it and/or modify
|
||||||
' it under the terms of the GNU General Public License as published by
|
' it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file axssl.c
|
|
||||||
*
|
|
||||||
* Demonstrate the use of the axTLS library in C with a set of
|
* Demonstrate the use of the axTLS library in C with a set of
|
||||||
* command-line parameters similar to openssl. In fact, openssl clients
|
* command-line parameters similar to openssl. In fact, openssl clients
|
||||||
* should be able to communicate with axTLS servers and visa-versa.
|
* should be able to communicate with axTLS servers and visa-versa.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* axssl.cs
|
|
||||||
*
|
|
||||||
* Demonstrate the use of the axTLS library in C# with a set of
|
* Demonstrate the use of the axTLS library in C# with a set of
|
||||||
* command-line parameters similar to openssl. In fact, openssl clients
|
* command-line parameters similar to openssl. In fact, openssl clients
|
||||||
* should be able to communicate with axTLS servers and visa-versa.
|
* should be able to communicate with axTLS servers and visa-versa.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* axssl.java
|
|
||||||
*
|
|
||||||
* Demonstrate the use of the axTLS library in Java with a set of
|
* Demonstrate the use of the axTLS library in Java with a set of
|
||||||
* command-line parameters similar to openssl. In fact, openssl clients
|
* command-line parameters similar to openssl. In fact, openssl clients
|
||||||
* should be able to communicate with axTLS servers and visa-versa. *
|
* should be able to communicate with axTLS servers and visa-versa. *
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
|
||||||
# axssl.pl
|
|
||||||
#
|
#
|
||||||
# Demonstrate the use of the axTLS library in Perl with a set of
|
# Demonstrate the use of the axTLS library in Perl with a set of
|
||||||
# command-line parameters similar to openssl. In fact, openssl clients
|
# command-line parameters similar to openssl. In fact, openssl clients
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
'
|
'
|
||||||
' Copyright(C) 2006
|
' Copyright(C) 2006 Cameron Rich
|
||||||
'
|
'
|
||||||
' This program is free software you can redistribute it and/or modify
|
' This program is free software you can redistribute it and/or modify
|
||||||
' it under the terms of the GNU General Public License as published by
|
' it under the terms of the GNU General Public License as published by
|
||||||
@ -16,8 +16,6 @@
|
|||||||
' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
'
|
'
|
||||||
|
|
||||||
'
|
|
||||||
' @file axssl.vb
|
|
||||||
'
|
'
|
||||||
' Demonstrate the use of the axTLS library in VB.NET with a set of
|
' Demonstrate the use of the axTLS library in VB.NET with a set of
|
||||||
' command-line parameters similar to openssl. In fact, openssl clients
|
' command-line parameters similar to openssl. In fact, openssl clients
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
24
ssl/bigint.c
24
ssl/bigint.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -423,7 +423,7 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod)
|
|||||||
|
|
||||||
if (v->size > 1 && V2)
|
if (v->size > 1 && V2)
|
||||||
{
|
{
|
||||||
/* we are implementing the following
|
/* we are implementing the following:
|
||||||
if (V2*q_dash > (((U(0)*COMP_RADIX + U(1) -
|
if (V2*q_dash > (((U(0)*COMP_RADIX + U(1) -
|
||||||
q_dash*V1)*COMP_RADIX) + U(2))) ... */
|
q_dash*V1)*COMP_RADIX) + U(2))) ... */
|
||||||
comp inner = (comp)((long_comp)COMP_RADIX*U(0) + U(1) -
|
comp inner = (comp)((long_comp)COMP_RADIX*U(0) + U(1) -
|
||||||
@ -449,6 +449,7 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod)
|
|||||||
{
|
{
|
||||||
Q(j)--;
|
Q(j)--;
|
||||||
tmp_u = bi_add(ctx, tmp_u, bi_copy(v));
|
tmp_u = bi_add(ctx, tmp_u, bi_copy(v));
|
||||||
|
|
||||||
/* lop off the carry */
|
/* lop off the carry */
|
||||||
tmp_u->size--;
|
tmp_u->size--;
|
||||||
v->size--;
|
v->size--;
|
||||||
@ -478,7 +479,7 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Perform an integer divide on a bigint.
|
* Perform an integer divide on a bigint.
|
||||||
*/
|
*/
|
||||||
static bigint *bi_int_divide(BI_CTX *ctx, bigint *biR, comp denom)
|
static bigint *bi_int_divide(BI_CTX *ctx, bigint *biR, comp denom)
|
||||||
@ -715,7 +716,7 @@ void bi_export(BI_CTX *ctx, bigint *x, uint8_t *data, int size)
|
|||||||
* @param ctx [in] The bigint session context.
|
* @param ctx [in] The bigint session context.
|
||||||
* @param bim [in] The bigint modulus that will be used.
|
* @param bim [in] The bigint modulus that will be used.
|
||||||
* @param mod_offset [in] There are three moduluii that can be stored - the
|
* @param mod_offset [in] There are three moduluii that can be stored - the
|
||||||
* standard modulus, and it's two primes p and q. This offset refers to which
|
* standard modulus, and its two primes p and q. This offset refers to which
|
||||||
* modulus we are referring to.
|
* modulus we are referring to.
|
||||||
* @see bi_free_mod(), bi_mod_power().
|
* @see bi_free_mod(), bi_mod_power().
|
||||||
*/
|
*/
|
||||||
@ -898,7 +899,7 @@ bigint *bi_multiply(BI_CTX *ctx, bigint *bia, bigint *bib)
|
|||||||
|
|
||||||
#ifdef CONFIG_BIGINT_SQUARE
|
#ifdef CONFIG_BIGINT_SQUARE
|
||||||
/*
|
/*
|
||||||
* Perform the actual square operion. It takes into account overflow
|
* Perform the actual square operion. It takes into account overflow.
|
||||||
*/
|
*/
|
||||||
static bigint *regular_square(BI_CTX *ctx, bigint *bi)
|
static bigint *regular_square(BI_CTX *ctx, bigint *bi)
|
||||||
{
|
{
|
||||||
@ -940,6 +941,7 @@ static bigint *regular_square(BI_CTX *ctx, bigint *bi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
w[i+t] += carry;
|
w[i+t] += carry;
|
||||||
|
|
||||||
if (u)
|
if (u)
|
||||||
{
|
{
|
||||||
w[i+t+1] = 1; /* add carry */
|
w[i+t+1] = 1; /* add carry */
|
||||||
@ -1018,7 +1020,7 @@ int bi_compare(bigint *bia, bigint *bib)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Allocate and zero more components. Does not consume bi.
|
* Allocate and zero more components. Does not consume bi.
|
||||||
*/
|
*/
|
||||||
static void more_comps(bigint *bi, int n)
|
static void more_comps(bigint *bi, int n)
|
||||||
@ -1051,6 +1053,7 @@ static bigint *alloc(BI_CTX *ctx, int size)
|
|||||||
biR = ctx->free_list;
|
biR = ctx->free_list;
|
||||||
ctx->free_list = biR->next;
|
ctx->free_list = biR->next;
|
||||||
ctx->free_count--;
|
ctx->free_count--;
|
||||||
|
|
||||||
if (biR->refs != 0)
|
if (biR->refs != 0)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SSL_FULL_MODE
|
#ifdef CONFIG_SSL_FULL_MODE
|
||||||
@ -1338,8 +1341,7 @@ bigint *bi_barrett(BI_CTX *ctx, bigint *bi)
|
|||||||
*/
|
*/
|
||||||
static void precompute_slide_window(BI_CTX *ctx, int window, bigint *g1)
|
static void precompute_slide_window(BI_CTX *ctx, int window, bigint *g1)
|
||||||
{
|
{
|
||||||
int k = 1;
|
int k = 1, i;
|
||||||
int i;
|
|
||||||
bigint *g2;
|
bigint *g2;
|
||||||
|
|
||||||
for (i = 0; i < window-1; i++) /* compute 2^(window-1) */
|
for (i = 0; i < window-1; i++) /* compute 2^(window-1) */
|
||||||
@ -1354,8 +1356,7 @@ static void precompute_slide_window(BI_CTX *ctx, int window, bigint *g1)
|
|||||||
|
|
||||||
for (i = 1; i < k; i++)
|
for (i = 1; i < k; i++)
|
||||||
{
|
{
|
||||||
ctx->g[i] = bi_residue(ctx, bi_multiply(ctx, ctx->g[i-1],
|
ctx->g[i] = bi_residue(ctx, bi_multiply(ctx, ctx->g[i-1], bi_copy(g2)));
|
||||||
bi_copy(g2)));
|
|
||||||
bi_permanent(ctx->g[i]);
|
bi_permanent(ctx->g[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1442,8 +1443,7 @@ bigint *bi_mod_power(BI_CTX *ctx, bigint *bi, bigint *biexp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
part_exp = (part_exp-1)/2; /* adjust for array */
|
part_exp = (part_exp-1)/2; /* adjust for array */
|
||||||
biR = bi_residue(ctx,
|
biR = bi_residue(ctx, bi_multiply(ctx, biR, ctx->g[part_exp]));
|
||||||
bi_multiply(ctx, biR, ctx->g[part_exp]));
|
|
||||||
i = l-1;
|
i = l-1;
|
||||||
}
|
}
|
||||||
else /* square it */
|
else /* square it */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file rsa.c
|
|
||||||
*
|
|
||||||
* Implements the RSA public encryption algorithm. Uses the bigint library to
|
* Implements the RSA public encryption algorithm. Uses the bigint library to
|
||||||
* perform its calculations.
|
* perform its calculations.
|
||||||
*/
|
*/
|
||||||
@ -68,8 +66,6 @@ void RSA_priv_key_new(RSA_CTX **ctx,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
void RSA_pub_key_new(RSA_CTX **ctx,
|
void RSA_pub_key_new(RSA_CTX **ctx,
|
||||||
const uint8_t *modulus, int mod_len,
|
const uint8_t *modulus, int mod_len,
|
||||||
const uint8_t *pub_exp, int pub_len)
|
const uint8_t *pub_exp, int pub_len)
|
||||||
@ -122,7 +118,6 @@ void RSA_free(RSA_CTX *rsa_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn int RSA_decrypt(RSA_CTX *ctx, const uint8_t *in_data, uint8_t *out_data)
|
|
||||||
* @brief Use PKCS1.5 for decryption/verification.
|
* @brief Use PKCS1.5 for decryption/verification.
|
||||||
* @param ctx [in] The context
|
* @param ctx [in] The context
|
||||||
* @param in_data [in] The data to encrypt (must be < modulus size-11)
|
* @param in_data [in] The data to encrypt (must be < modulus size-11)
|
||||||
@ -183,7 +178,6 @@ int RSA_decrypt(RSA_CTX *ctx, const uint8_t *in_data, uint8_t *out_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn bigint *RSA_private(RSA_CTX *c, bigint *bi_msg)
|
|
||||||
* Performs m = c^d mod n
|
* Performs m = c^d mod n
|
||||||
*/
|
*/
|
||||||
bigint *RSA_private(RSA_CTX *c, bigint *bi_msg)
|
bigint *RSA_private(RSA_CTX *c, bigint *bi_msg)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or modify
|
# This library is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This license is free software; you can redistribute it and/or modify
|
# This license is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file perf_bigint.c
|
|
||||||
*
|
|
||||||
* Some performance testing of bigint.
|
* Some performance testing of bigint.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This license is free software; you can redistribute it and/or modify
|
* This license is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ssltest.c
|
|
||||||
*
|
|
||||||
* The testing of the crypto and ssl stuff goes here. Keeps the individual code
|
* The testing of the crypto and ssl stuff goes here. Keeps the individual code
|
||||||
* modules from being uncluttered with test code.
|
* modules from being uncluttered with test code.
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright(C) 2006
|
# Copyright(C) 2006 Cameron Rich
|
||||||
#
|
#
|
||||||
# This license is free software; you can redistribute it and/or modify
|
# This license is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Lesser General Public License as published by
|
# it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright(C) 2006
|
* Copyright(C) 2006 Cameron Rich
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
Loading…
x
Reference in New Issue
Block a user