summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/rsa/rsa.go
AgeCommit message (Collapse)AuthorFilesLines
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-164/+126
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-9/+158
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-0/+8
2010-05-03big: completed set of Int division routines & cleanupsRobert Griesemer1-4/+4
- renamed Len -> BitLen, simplified implementation - renamed old Div, Mod, DivMod -> Que, Rem, QuoRem - implemented Div, Mod, DivMod (Euclidian definition, more useful in a mathematical context) - fixed a bug in Exp (-0 was possible) - added extra tests to check normalized results everywhere - uniformly set Int.neg flag at the end of computations - minor cosmetic cleanups - ran all tests R=rsc CC=golang-dev http://codereview.appspot.com/1091041
2010-03-29comment typo in crypto/rsa/rsa.goAndrew Gerrand1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/823041
2010-03-08crypto/rsa: don't use safe primes.Adam Langley1-10/+6
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-149/+149
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-12-03crypto/rsa: fix shadowing error.Adam Langley1-2/+2
Fixes bug 375. R=rsc http://codereview.appspot.com/165045
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-6/+6
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-18remove bytes.CopyRob Pike1-4/+3
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-17crypto/rsa: add PKCS#1 v1.5 signature support.Adam Langley1-0/+6
R=rsc CC=golang-dev http://codereview.appspot.com/156051
2009-11-14crypto/rsa: handle the case of non-coprime blinds.Adam Langley1-10/+25
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-37/+27
2009-11-11roll back 3985: build is brokenRuss Cox1-27/+37
TBR=agl1 CC=golang-dev http://codereview.appspot.com/154065
2009-11-11big:Adam Langley1-37/+27
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-09 - replaced gofmt expression formatting algorithm withRobert Griesemer1-18/+18
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-15/+15
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-3/+1
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt'ed more stragglersRobert Griesemer1-8/+8
(now down to a handfull of files in pkg) R=rsc http://go/go-review/1019006
2009-11-05crypto/tls (part 5/5)Adam Langley1-1/+15
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-03crypto/rsa: fix blinding when using a null random source.Adam Langley1-0/+4
For testing it can be useful to use a null random source (one which always returns zero) to remove non-determinism from the tests. However, when performing RSA blinding, the random blind ends up being zero and it's hard to reverse a multiplication by zero. R=rsc CC=go-dev http://go/go-review/1018033
2009-11-02Split constant time functions into crypto/subtle.Adam Langley1-65/+14
R=rsc CC=go-dev http://go/go-review/1018020
2009-10-29Add RSA PKCS#1 v1.5 support.Adam Langley1-7/+31
R=go-dev APPROVED=rsc DELTA=407 (400 added, 0 deleted, 7 changed) OCL=36007 CL=36146
2009-10-21Add initial x509 code.Adam Langley1-0/+37
R=rsc APPROVED=rsc DELTA=659 (659 added, 0 deleted, 0 changed) OCL=35932 CL=35975
2009-10-19Add an RSA-OAEP implementation.Adam Langley1-0/+413
R=rsc APPROVED=rsc DELTA=734 (734 added, 0 deleted, 0 changed) OCL=35738 CL=35879