srp_lib.c (238405) | srp_lib.c (261037) |
---|---|
1/* crypto/srp/srp_lib.c */ 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 4 * for the EdelKey project and contributed to the OpenSSL project 2004. 5 */ 6/* ==================================================================== 7 * Copyright (c) 2004 The OpenSSL Project. All rights reserved. 8 * --- 49 unchanged lines hidden (view full) --- 58 */ 59#ifndef OPENSSL_NO_SRP 60#include "cryptlib.h" 61#include "srp_lcl.h" 62#include <openssl/srp.h> 63#include <openssl/evp.h> 64 65#if (BN_BYTES == 8) | 1/* crypto/srp/srp_lib.c */ 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 4 * for the EdelKey project and contributed to the OpenSSL project 2004. 5 */ 6/* ==================================================================== 7 * Copyright (c) 2004 The OpenSSL Project. All rights reserved. 8 * --- 49 unchanged lines hidden (view full) --- 58 */ 59#ifndef OPENSSL_NO_SRP 60#include "cryptlib.h" 61#include "srp_lcl.h" 62#include <openssl/srp.h> 63#include <openssl/evp.h> 64 65#if (BN_BYTES == 8) |
66#define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##ul | 66# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) 67# define bn_pack4(a1,a2,a3,a4) ((a1##UI64<<48)|(a2##UI64<<32)|(a3##UI64<<16)|a4##UI64) 68# elif defined(__arch64__) 69# define bn_pack4(a1,a2,a3,a4) ((a1##UL<<48)|(a2##UL<<32)|(a3##UL<<16)|a4##UL) 70# else 71# define bn_pack4(a1,a2,a3,a4) ((a1##ULL<<48)|(a2##ULL<<32)|(a3##ULL<<16)|a4##ULL) 72# endif 73#elif (BN_BYTES == 4) 74# define bn_pack4(a1,a2,a3,a4) ((a3##UL<<16)|a4##UL), ((a1##UL<<16)|a2##UL) 75#else 76# error "unsupported BN_BYTES" |
67#endif | 77#endif |
68#if (BN_BYTES == 4) 69#define bn_pack4(a1,a2,a3,a4) 0x##a3##a4##ul, 0x##a1##a2##ul 70#endif 71#if (BN_BYTES == 2) 72#define bn_pack4(a1,a2,a3,a4) 0x##a4##u,0x##a3##u,0x##a2##u,0x##a1##u 73#endif | |
74 75 76#include "srp_grps.h" 77 78static BIGNUM *srp_Calc_k(BIGNUM *N, BIGNUM *g) 79 { 80 /* k = SHA1(N | PAD(g)) -- tls-srp draft 8 */ 81 --- 276 unchanged lines hidden --- | 78 79 80#include "srp_grps.h" 81 82static BIGNUM *srp_Calc_k(BIGNUM *N, BIGNUM *g) 83 { 84 /* k = SHA1(N | PAD(g)) -- tls-srp draft 8 */ 85 --- 276 unchanged lines hidden --- |