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

Side by Side Diff: ssh/kex.go

Issue 14430055: code review 14430055: go.crypto/ssh: cosmetic only spelling fixes (Closed)
Patch Set: diff -r 812c06b5a384 https://code.google.com/p/go.crypto Created 10 years, 5 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:
View unified diff | Download patch
« no previous file with comments | « ssh/common.go ('k') | ssh/server.go » ('j') | ssh/server.go » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Go Authors. All rights reserved. 1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package ssh 5 package ssh
6 6
7 import ( 7 import (
8 "crypto" 8 "crypto"
9 "crypto/ecdsa" 9 "crypto/ecdsa"
10 "crypto/elliptic" 10 "crypto/elliptic"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return false 275 return false
276 } 276 }
277 277
278 if !curve.IsOnCurve(x, y) { 278 if !curve.IsOnCurve(x, y) {
279 return false 279 return false
280 } 280 }
281 281
282 // We don't check if N * PubKey == 0, since 282 // We don't check if N * PubKey == 0, since
283 // 283 //
284 // - the NIST curves have cofactor = 1, so this is implicit. 284 // - the NIST curves have cofactor = 1, so this is implicit.
285 » // (We don't forsee an implementation that supports non NIST 285 » // (We don't foresee an implementation that supports non NIST
286 // curves) 286 // curves)
287 // 287 //
288 // - for ephemeral keys, we don't need to worry about small 288 // - for ephemeral keys, we don't need to worry about small
289 // subgroup attacks. 289 // subgroup attacks.
290 return true 290 return true
291 } 291 }
292 292
293 func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, p riv Signer) (result *kexResult, err error) { 293 func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, p riv Signer) (result *kexResult, err error) {
294 packet, err := c.readPacket() 294 packet, err := c.readPacket()
295 if err != nil { 295 if err != nil {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{ 378 kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{
379 g: new(big.Int).SetInt64(2), 379 g: new(big.Int).SetInt64(2),
380 p: p, 380 p: p,
381 } 381 }
382 382
383 kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()} 383 kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()}
384 kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()} 384 kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()}
385 kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()} 385 kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()}
386 } 386 }
OLDNEW
« no previous file with comments | « ssh/common.go ('k') | ssh/server.go » ('j') | ssh/server.go » ('J')

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