summaryrefslogtreecommitdiff
path: root/src/pkg/crypto
AgeCommit message (Collapse)AuthorFilesLines
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
2009-10-08more lgtm files from gofmtRuss Cox6-41/+39
R=gri OCL=35485 CL=35488
2009-10-06gofmt on crypto, debugRuss Cox28-659/+510
R=gri DELTA=2560 (127 added, 177 deleted, 2256 changed) OCL=35388 CL=35395
2009-09-29Add crypto/rc4.Adam Langley3-0/+136
RC4 is a common stream cipher. This adds a pure-go C implementation. R=r APPROVED=r DELTA=139 (138 added, 0 deleted, 1 changed) OCL=35056 CL=35092
2009-09-17unused importsRuss Cox7-10/+1
R=r OCL=34731 CL=34731
2009-09-16rename bytes.Buffer.Data() to bytes.Buffer.Bytes()Rob Pike8-16/+16
R=rsc DELTA=152 (6 added, 0 deleted, 146 changed) OCL=34695 CL=34701
2009-09-15more "declared and not used".Russ Cox9-17/+17
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-08-20naming cleanup.Russ Cox8-16/+16
gzip.GzipInflater -> gzip.Inflater gzip.NewGzipInflater -> gzip.NewInflater zlib.NewZlibInflater -> zlib.NewInflater io.ByteReader deleted in favor of bytes.Buffer io.NewByteReader -> bytes.NewBuffer R=r DELTA=52 (3 added, 0 deleted, 49 changed) OCL=33589 CL=33592
2009-08-12convert non-low-level non-google pkg codeRuss Cox32-372/+35
to whole-package compilation. R=r OCL=33070 CL=33101
2009-06-29io.StringBytes -> strings.BytesRuss Cox9-22/+30
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-25Change os.Error convention:Russ Cox2-3/+16
echo back context of call in error if likely to be useful. For example, if os.Open("/etc/passwd", os.O_RDONLY) fails with syscall.EPERM, it returns as the os.Error &PathError{ Op: "open", Path: "/etc/passwd" Error: os.EPERM } which formats as open /etc/passwd: permission denied Not converted: datafmt go/... google/... regexp tabwriter template R=r DELTA=1153 (561 added, 156 deleted, 436 changed) OCL=30738 CL=30781
2009-06-22introduce os.EOF and io.ErrUnexpectedEOF.Russ Cox2-4/+4
remove io.ErrEOF. rename io.FullRead to io.ReadFull, to match ReadAtLeast and ReadAll. remove io.FullReader, because it is now unused. R=r DELTA=295 (88 added, 105 deleted, 102 changed) OCL=30544 CL=30588
2009-06-09mv src/lib to src/pkgRob Pike35-0/+4843
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102