List Info

Thread: OpenSSL: OpenSSL_0_9_7-stable: openssl/fips-1.0/dsa/ fips_dssvs....




OpenSSL: OpenSSL_0_9_7-stable: openssl/fips-1.0/dsa/ fips_dssvs....
country flaguser name
Germany
2007-10-05 12:09:10
  OpenSSL CVS Repository
  http://cvs.openssl.org/
 
____________________________________________________________
________________

  Server: cvs.openssl.org                  Name:   Dr.
Stephen Henson
  Root:   /v/openssl/cvs                   Email:  steveopenssl.org
  Module: openssl                          Date:  
05-Oct-2007 19:09:10
  Branch: OpenSSL_0_9_7-stable             Handle:
2007100518091000

  Modified files:           (Branch: OpenSSL_0_9_7-stable)
    openssl/fips-1.0/dsa    fips_dssvs.c

  Log:
    Add pqgver option.

  Summary:
    Revision    Changes     Path
    1.1.2.4     +72 -0     
openssl/fips-1.0/dsa/fips_dssvs.c
 
____________________________________________________________
________________

  patch -p0 <<' .'
  Index: openssl/fips-1.0/dsa/fips_dssvs.c
 
============================================================
================
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 fips_dssvs.c
  --- openssl/fips-1.0/dsa/fips_dssvs.c	23 Jan 2007 17:51:07
-0000	1.1.2.3
  +++ openssl/fips-1.0/dsa/fips_dssvs.c	5 Oct 2007 17:09:10
-0000	1.1.2.4
   -204,6 +204,76 
   	}
       }
   
  +void pqgver()
  +    {
  +    char buf[1024];
  +    char lbuf[1024];
  +    char *keyword, *value;
  +    BIGNUM *p = NULL, *q = NULL, *g = NULL;
  +    int counter, counter2;
  +    unsigned long h, h2;
  +    DSA *dsa=NULL;
  +    int nmod=0;
  +    unsigned char seed[1024];
  +
  +    while(fgets(buf,sizeof buf,stdin) != NULL)
  +	{
  +	if (!parse_line(&keyword, &value, lbuf, buf))
  +		{
  +		fputs(buf,stdout);
  +		continue;
  +		}
  +	if(!strcmp(keyword,"[mod"))
  +	    nmod=atoi(value);
  +	else if(!strcmp(keyword,"P"))
  +	    p=hex2bn(value);
  +	else if(!strcmp(keyword,"Q"))
  +	    q=hex2bn(value);
  +	else if(!strcmp(keyword,"G"))
  +	    g=hex2bn(value);
  +	else if(!strcmp(keyword,"Seed"))
  +	    {
  +	    int slen = hex2bin(value, seed);
  +	    if (slen != 20)
  +		{
  +		fprintf(stderr, "Seed parse length
errorn");
  +		exit (1);
  +		}
  +	    }
  +	else if(!strcmp(keyword,"c"))
  +	    counter =atoi(buf+4);
  +	else if(!strcmp(keyword,"H"))
  +	    {
  +	    h = atoi(value);
  +	    if (!p || !q || !g)
  +		{
  +		fprintf(stderr, "Parse Errorn");
  +		exit (1);
  +		}
  +	    pbn("P",p);
  +	    pbn("Q",q);
  +	    pbn("G",g);
  +	    pv("Seed",seed,20);
  +	    printf("c = %dn",counter);
  +	    printf("H = %lxn",h);
  +	   
dsa=DSA_generate_parameters(nmod,seed,20,&counter2,&
h2,NULL,NULL);
  +            if (BN_cmp(dsa->p, p) || BN_cmp(dsa->q,
q) || BN_cmp(dsa->g, g)
  +		|| (counter != counter2) || (h != h2))
  +	    	printf("Result = Fn");
  +	    else
  +	    	printf("Result = Tn");
  +	    BN_free(p);
  +	    BN_free(q);
  +	    BN_free(g);
  +	    p = NULL;
  +	    q = NULL;
  +	    g = NULL;
  +	    DSA_free(dsa);
  +	    dsa = NULL;
  +	    }
  +	}
  +    }
  +
   void keypair()
       {
       char buf[1024];
   -377,6 +447,8 
   	primes();
       else if(!strcmp(argv[1],"pqg"))
   	pqg();
  +    else if(!strcmp(argv[1],"pqgver"))
  +	pqgver();
       else if(!strcmp(argv[1],"keypair"))
   	keypair();
       else if(!strcmp(argv[1],"siggen"))
   .
____________________________________________________________
__________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                    
openssl-cvsopenssl.org
Automated List Manager                          
majordomoopenssl.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )