summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/rsa/rsa_test.go
AgeCommit message (Collapse)AuthorFilesLines
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-9/+27
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-7/+87
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-1/+1
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-18/+12
2010-03-08crypto/rsa: don't use safe primes.Adam Langley1-1/+1
Previously we would require safe primes for our RSA key generation. Since this took rather a long time, this removes the requirement that the primes be safe. OpenSSL doesn't use safe primes for RSA key generation either (openssl-0.9.8l/crypto/rsa/rsa_gen.c:122) Fixes issue 649. R=rsc CC=golang-dev http://codereview.appspot.com/253041
2009-12-15 1) Change default gofmt default settings forRobert Griesemer1-34/+34
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 1st set of files. R=rsc CC=agl, golang-dev, iant, ken2, r http://codereview.appspot.com/180047
2009-11-14crypto/rsa: handle the case of non-coprime blinds.Adam Langley1-1/+1
We are dealing with the multiplicative group ℤ/pqℤ. Multiples of either p or q are not members of the group since they cannot have an inverse. (Such numbers are 0 in the subgroup ℤ/pℤ.) With p and q of typical size (> 512 bits), the probability of a random blind [1..pq-1] being a multiple of p or q is negligible. However, in the unit tests, much smaller sizes are used and the event could occur. This change checks the result of the ext GCD and deals with this case. It also increases the size of p and q in the unit test as a large number of the keys selected were p, q = 227,169. R=rsc CC=golang-dev http://codereview.appspot.com/154141 Committer: Russ Cox <rsc@golang.org>
2009-11-11Reland a112249da741, this time with missing file.Adam Langley1-14/+8
2009-11-11roll back 3985: build is brokenRuss Cox1-8/+14
TBR=agl1 CC=golang-dev http://codereview.appspot.com/154065
2009-11-11big:Adam Langley1-14/+8
Turn methods that don't store the result in their receiver into functions in order to preserve the convention. Re-jig Exp and Div by moving their guts into nat.go. Add ProbablyPrime to perform Miller-Rabin primality tests. crypto/rsa: reenable key generation since we now have ProbablyPrime. R=gri CC=go-dev http://codereview.prom.corp.google.com/1024038
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-7/+7
R=rsc, r http://go/go-review/1025029
2009-11-05crypto/tls (part 5/5)Adam Langley1-1/+7
Make RSA and X509 build by using big. (This involves commenting out key generation for now since I haven't written Miller-Rabin in big yet.) Add entries to the Makefile. R=rsc CC=go-dev http://go/go-review/1022005
2009-11-02Split constant time functions into crypto/subtle.Adam Langley1-142/+47
R=rsc CC=go-dev http://go/go-review/1018020
2009-10-29Add RSA PKCS#1 v1.5 support.Adam Langley1-0/+56
R=go-dev APPROVED=rsc DELTA=407 (400 added, 0 deleted, 7 changed) OCL=36007 CL=36146
2009-10-21Replace SliceReader with bytes.Buffer.Adam Langley1-16/+1
R=r APPROVED=r DELTA=16 (0 added, 15 deleted, 1 changed) OCL=35976 CL=35978
2009-10-19Add an RSA-OAEP implementation.Adam Langley1-0/+310
R=rsc APPROVED=rsc DELTA=734 (734 added, 0 deleted, 0 changed) OCL=35738 CL=35879