summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/rsa
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-77/+15
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý3-183/+159
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý4-22/+255
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý2-1/+9
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý2-51/+21
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý4-46/+42
2010-05-03big: completed set of Int division routines & cleanupsRobert Griesemer3-10/+10
- 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 Langley2-11/+7
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
2010-02-25strings: delete Runes, BytesRuss Cox1-7/+6
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2009-12-15 1) Change default gofmt default settings forRobert Griesemer4-311/+311
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-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox2-8/+8
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-18remove bytes.CopyRob Pike2-8/+6
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 Langley3-0/+179
R=rsc CC=golang-dev http://codereview.appspot.com/156051
2009-11-14crypto/rsa: handle the case of non-coprime blinds.Adam Langley2-11/+26
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 Langley2-51/+35
2009-11-11roll back 3985: build is brokenRuss Cox2-35/+51
TBR=agl1 CC=golang-dev http://codereview.appspot.com/154065
2009-11-11big:Adam Langley2-51/+35
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 Griesemer3-24/+24
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 Griesemer4-39/+39
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 Langley4-4/+24
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-03encoding/*: reverse the order of src, dst so that dst is first.Adam Langley1-1/+1
R=rsc CC=go-dev http://go/go-review/1017021
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 Langley3-216/+71
R=rsc CC=go-dev http://go/go-review/1018020
2009-10-29Add RSA PKCS#1 v1.5 support.Adam Langley5-7/+407
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-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 Langley3-0/+734
R=rsc APPROVED=rsc DELTA=734 (734 added, 0 deleted, 0 changed) OCL=35738 CL=35879