summaryrefslogtreecommitdiff
path: root/src/pkg/crypto
AgeCommit message (Collapse)AuthorFilesLines
2009-12-28crypto/tls: make Listener a pointer.Adam Langley1-4/+5
Listener contains private members and 6g now enforces that private members cannot be assigned outside of their package. R=rsc CC=golang-dev http://codereview.appspot.com/183073
2009-12-23crypto/tls: extensions and Next Protocol NegotiationAdam Langley9-28/+379
Add support for TLS extensions in general and Next Protocol Negotiation in particular. R=rsc CC=golang-dev http://codereview.appspot.com/181045
2009-12-15 1) Change default gofmt default settings forRobert Griesemer65-2831/+2831
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-14crypto/sha256: new packageAndy Davis4-0/+332
R=rsc CC=golang-dev http://codereview.appspot.com/176062 Committer: Russ Cox <rsc@golang.org>
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-41/+41
R=rsc http://codereview.appspot.com/172041
2009-12-09Added XTEA block cipher package to src/pkg/cryptoAdrian O'Grady4-0/+416
This is an adaption of the code from http://en.wikipedia.org/wiki/XTEA. The package also implements the block.Cipher interface so that it can be used with the various block modes. R=rsc http://codereview.appspot.com/157152 Committer: Russ Cox <rsc@golang.org>
2009-12-03crypto/rsa: fix shadowing error.Adam Langley1-2/+2
Fixes bug 375. R=rsc http://codereview.appspot.com/165045
2009-11-30a[b:len(a)] -> a[b:]Christopher Wedgwood2-7/+7
R=r, rsc CC=agl1 http://codereview.appspot.com/161070 Committer: Russ Cox <rsc@golang.org>
2009-11-29crypto/md4, exp/draw/x11: fix makefile to build when GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
this is the exact same thing issue #115 is about. fix makefiles to use relative path to work in the case we have whitespaces as part of GOROOT. R=rsc http://codereview.appspot.com/162055 Committer: Russ Cox <rsc@golang.org>
2009-11-24Change to container/vector interface:Robert Griesemer1-1/+1
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-23Provides implementation of MD4 hashing algorithm.Chris Lennert4-0/+278
See IETF RFC 1320, http://tools.ietf.org/html/rfc1320. Fixes issue 279. R=rsc http://codereview.appspot.com/159051 Committer: Russ Cox <rsc@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia10-20/+20
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-21crypto/tls: add initial client implementation.Adam Langley9-7/+439
R=rsc, agl CC=golang-dev http://codereview.appspot.com/157076
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox15-50/+50
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-18crypto/x509: RawContents -> RawContentAdam Langley1-1/+1
TBR=rsc R=rsc http://codereview.appspot.com/157075
2009-11-18crypto/x509: add certificate support.Adam Langley2-3/+623
R=rsc CC=golang-dev http://codereview.appspot.com/156054
2009-11-18remove bytes.CopyRob Pike7-39/+29
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-17asn1:Adam Langley1-1/+1
* add Marshal * add BitString.RightAlign * change to using a *time.Time (from time.Time) since that's what the time package uses. * return the unparsed data from Unmarshal. R=rsc CC=golang-dev http://codereview.appspot.com/156047
2009-11-15crypto/md5: fix comment typo.Adam Langley1-1/+1
Fixes issue 210. R=rsc CC=golang-dev http://codereview.appspot.com/155057
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-14typosRuss Cox1-1/+1
Fixes issue 171. Fixes issue 172. R=agl1 http://codereview.appspot.com/154136
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-11use fully qualified names for hash interfacesRuss Cox2-2/+2
Fixes issue 38. R=r1, r http://codereview.appspot.com/152072
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer28-178/+178
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 Griesemer45-315/+315
R=rsc, r http://go/go-review/1025029
2009-11-08assorted cleanupRuss Cox1-2/+0
R=r, iant CC=go-dev http://go/go-review/1025024
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer13-64/+22
- 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-06big: fix carry error, add test case.Adam Langley1-13/+0
crypto/x509: reenable tests. R=gri CC=go-dev http://go/go-review/1026004
2009-11-06minor fixups by gofmtRobert Griesemer1-2/+1
R=agl http://go/go-review/1024009
2009-11-06crypto/x509: build fix for 32-bitAdam Langley1-0/+14
TBR=rsc R=rsc CC=go-dev http://go/go-review/1024007
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 6/5)Adam Langley2-4/+10
Results of running gofmt again. R=rsc CC=go-dev http://go/go-review/1022006 Committer: Adam Langley <agl@golang.org>
2009-11-05crypto/tls (part 5/5)Adam Langley6-6/+26
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-05crypto/tls (part 4/5)Adam Langley2-0/+191
R=rsc CC=go-dev http://go/go-review/1019002
2009-11-05crypto/tls (part 3)Adam Langley4-0/+871
(With hindsight, record_process might have been designed wrong, but it works for now. It'll get redrawn when client support is added.) R=rsc CC=r http://go/go-review/1018032 Committer: Adam Langley <agl@golang.org>
2009-11-04gofmt-ify cryptoRobert Griesemer4-17/+23
R=agl CC=rsc http://go/go-review/1017032
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/tls (part 2)Adam Langley5-0/+610
R=rsc CC=go-dev http://go/go-review/1018028
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-02crypto/tls (part 1)Adam Langley4-0/+418
Rather than drop everything into a single, huge review, I've included some simple bits of code here. R=rsc CC=go-dev http://go/go-review/1016029
2009-11-02Split constant time functions into crypto/subtle.Adam Langley6-216/+247
R=rsc CC=go-dev http://go/go-review/1018020
2009-11-01reverse the arguments to io.Copy so the destination is on theRob Pike8-22/+22
left, like an assignment, like strcpy, etc. R=rsc CC=go-dev http://go/go-review/1016011
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 Langley4-0/+163
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
2009-10-14toss crypto/block Digest in favor of hash.HashRuss Cox3-21/+14
R=r DELTA=30 (8 added, 15 deleted, 7 changed) OCL=35677 CL=35713