Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(457)

Delta Between Two Patch Sets: poly1305/sum_amd64.go.needs103

Issue 6494105: code review 6494105: go.crypto/poly1305: add package. (Closed)
Left Patch Set: Created 11 years, 6 months ago
Right Patch Set: diff -r 05426f7f4922 https://code.google.com/p/go.crypto Created 11 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « poly1305/poly1305_test.go ('k') | poly1305/sum_ref.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package poly1305
6
7 // This function is implemented in poly1305_amd64.s
8 func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
9
10 // Sum generates an authenticator for m using a one-time key and puts the
11 // 16-byte result into out. Authenticating two different messages with the same
12 // key allows an attacker to forge messages at will.
13 func Sum(out *[16]byte, m []byte, key *[32]byte) {
14 var mPtr *byte
15 if len(m) > 0 {
16 mPtr = &m[0]
17 }
18 poly1305(out, mPtr, uint64(len(m)), key)
19 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b