all: use HTTPS for links that support it

Many websites now support HTTPS that may not at the time the code was
committed; let's use the HTTPS links where we can.

Change-Id: I7099dfa0dbb213294e65b4387f343d6e8f955b97
Reviewed-on: https://go-review.googlesource.com/47131
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/AUTHORS b/AUTHORS
index 15167cd..2b00ddb 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,3 +1,3 @@
 # This source code refers to The Go Authors for copyright purposes.
 # The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
+# visible at https://tip.golang.org/AUTHORS.
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 1c4577e..1fbd3e9 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1,3 +1,3 @@
 # This source code was written by the Go contributors.
 # The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
+# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/README b/README
index f1e0cbf..5910f88 100644
--- a/README
+++ b/README
@@ -1,3 +1,3 @@
 This repository holds supplementary Go cryptography libraries.
 
-To submit changes to this repository, see http://golang.org/doc/contribute.html.
+To submit changes to this repository, see https://golang.org/doc/contribute.html.
diff --git a/blowfish/blowfish_test.go b/blowfish/blowfish_test.go
index 7afa1fd..368ba87 100644
--- a/blowfish/blowfish_test.go
+++ b/blowfish/blowfish_test.go
@@ -12,7 +12,7 @@
 	out []byte
 }
 
-// Test vector values are from http://www.schneier.com/code/vectors.txt.
+// Test vector values are from https://www.schneier.com/code/vectors.txt.
 var encryptTests = []CryptTest{
 	{
 		[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
diff --git a/blowfish/cipher.go b/blowfish/cipher.go
index a73954f..2641dad 100644
--- a/blowfish/cipher.go
+++ b/blowfish/cipher.go
@@ -6,7 +6,7 @@
 package blowfish // import "golang.org/x/crypto/blowfish"
 
 // The code is a port of Bruce Schneier's C implementation.
-// See http://www.schneier.com/blowfish.html.
+// See https://www.schneier.com/blowfish.html.
 
 import "strconv"
 
diff --git a/blowfish/const.go b/blowfish/const.go
index 8c5ee4c..d040775 100644
--- a/blowfish/const.go
+++ b/blowfish/const.go
@@ -4,7 +4,7 @@
 
 // The startup permutation array and substitution boxes.
 // They are the hexadecimal digits of PI; see:
-// http://www.schneier.com/code/constants.txt.
+// https://www.schneier.com/code/constants.txt.
 
 package blowfish
 
diff --git a/curve25519/const_amd64.h b/curve25519/const_amd64.h
index 80ad222..b3f7416 100644
--- a/curve25519/const_amd64.h
+++ b/curve25519/const_amd64.h
@@ -3,6 +3,6 @@
 // license that can be found in the LICENSE file.
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 #define REDMASK51     0x0007FFFFFFFFFFFF
diff --git a/curve25519/const_amd64.s b/curve25519/const_amd64.s
index 0ad5398..ee7b4bd 100644
--- a/curve25519/const_amd64.s
+++ b/curve25519/const_amd64.s
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 // +build amd64,!gccgo,!appengine
 
diff --git a/curve25519/doc.go b/curve25519/doc.go
index ebeea3c..da9b10d 100644
--- a/curve25519/doc.go
+++ b/curve25519/doc.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package curve25519 provides an implementation of scalar multiplication on
-// the elliptic curve known as curve25519. See http://cr.yp.to/ecdh.html
+// the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html
 package curve25519 // import "golang.org/x/crypto/curve25519"
 
 // basePoint is the x coordinate of the generator of the curve.
diff --git a/curve25519/freeze_amd64.s b/curve25519/freeze_amd64.s
index 536479b..3908161 100644
--- a/curve25519/freeze_amd64.s
+++ b/curve25519/freeze_amd64.s
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 // +build amd64,!gccgo,!appengine
 
diff --git a/curve25519/ladderstep_amd64.s b/curve25519/ladderstep_amd64.s
index 7074e5c..9e9040b 100644
--- a/curve25519/ladderstep_amd64.s
+++ b/curve25519/ladderstep_amd64.s
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 // +build amd64,!gccgo,!appengine
 
diff --git a/curve25519/mul_amd64.s b/curve25519/mul_amd64.s
index b162e65..5ce80a2 100644
--- a/curve25519/mul_amd64.s
+++ b/curve25519/mul_amd64.s
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 // +build amd64,!gccgo,!appengine
 
diff --git a/curve25519/square_amd64.s b/curve25519/square_amd64.s
index 4e864a8..12f7373 100644
--- a/curve25519/square_amd64.s
+++ b/curve25519/square_amd64.s
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 // +build amd64,!gccgo,!appengine
 
diff --git a/ed25519/ed25519.go b/ed25519/ed25519.go
index f1d9567..9b07acc 100644
--- a/ed25519/ed25519.go
+++ b/ed25519/ed25519.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package ed25519 implements the Ed25519 signature algorithm. See
-// http://ed25519.cr.yp.to/.
+// https://ed25519.cr.yp.to/.
 //
 // These functions are also compatible with the “Ed25519” function defined in
 // https://tools.ietf.org/html/draft-irtf-cfrg-eddsa-05.
diff --git a/ed25519/ed25519_test.go b/ed25519/ed25519_test.go
index 638e525..e272f8a 100644
--- a/ed25519/ed25519_test.go
+++ b/ed25519/ed25519_test.go
@@ -91,7 +91,7 @@
 
 func TestGolden(t *testing.T) {
 	// sign.input.gz is a selection of test cases from
-	// http://ed25519.cr.yp.to/python/sign.input
+	// https://ed25519.cr.yp.to/python/sign.input
 	testDataZ, err := os.Open("testdata/sign.input.gz")
 	if err != nil {
 		t.Fatal(err)
diff --git a/pkcs12/bmp-string.go b/pkcs12/bmp-string.go
index 284d2a6..233b8b6 100644
--- a/pkcs12/bmp-string.go
+++ b/pkcs12/bmp-string.go
@@ -13,7 +13,7 @@
 func bmpString(s string) ([]byte, error) {
 	// References:
 	// https://tools.ietf.org/html/rfc7292#appendix-B.1
-	// http://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
+	// https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
 	//  - non-BMP characters are encoded in UTF 16 by using a surrogate pair of 16-bit codes
 	//	  EncodeRune returns 0xfffd if the rune does not need special encoding
 	//  - the above RFC provides the info that BMPStrings are NULL terminated.
diff --git a/poly1305/poly1305.go b/poly1305/poly1305.go
index 4a5f826..f562fa5 100644
--- a/poly1305/poly1305.go
+++ b/poly1305/poly1305.go
@@ -3,7 +3,8 @@
 // license that can be found in the LICENSE file.
 
 /*
-Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf.
+Package poly1305 implements Poly1305 one-time message authentication code as
+specified in https://cr.yp.to/mac/poly1305-20050329.pdf.
 
 Poly1305 is a fast, one-time authentication function. It is infeasible for an
 attacker to generate an authenticator for a message without the key. However, a
diff --git a/salsa20/salsa/salsa2020_amd64.s b/salsa20/salsa/salsa2020_amd64.s
index 083fe38..22afbdc 100644
--- a/salsa20/salsa/salsa2020_amd64.s
+++ b/salsa20/salsa/salsa2020_amd64.s
@@ -5,7 +5,7 @@
 // +build amd64,!appengine,!gccgo
 
 // This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
+// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
 
 // func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
 // This needs up to 64 bytes at 360(SP); hence the non-obvious frame size.
diff --git a/salsa20/salsa20.go b/salsa20/salsa20.go
index fde9846..a8ddd76 100644
--- a/salsa20/salsa20.go
+++ b/salsa20/salsa20.go
@@ -3,20 +3,20 @@
 // license that can be found in the LICENSE file.
 
 /*
-Package salsa20 implements the Salsa20 stream cipher as specified in http://cr.yp.to/snuffle/spec.pdf.
+Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf.
 
 Salsa20 differs from many other stream ciphers in that it is message orientated
 rather than byte orientated. Keystream blocks are not preserved between calls,
 therefore each side must encrypt/decrypt data with the same segmentation.
 
 Another aspect of this difference is that part of the counter is exposed as
-an nonce in each call. Encrypting two different messages with the same (key,
+a nonce in each call. Encrypting two different messages with the same (key,
 nonce) pair leads to trivial plaintext recovery. This is analogous to
 encrypting two different messages with the same key with a traditional stream
 cipher.
 
 This package also implements XSalsa20: a version of Salsa20 with a 24-byte
-nonce as specified in http://cr.yp.to/snuffle/xsalsa-20081128.pdf. Simply
+nonce as specified in https://cr.yp.to/snuffle/xsalsa-20081128.pdf. Simply
 passing a 24-byte slice as the nonce triggers XSalsa20.
 */
 package salsa20 // import "golang.org/x/crypto/salsa20"
diff --git a/scrypt/scrypt.go b/scrypt/scrypt.go
index 7455395..14375c5 100644
--- a/scrypt/scrypt.go
+++ b/scrypt/scrypt.go
@@ -4,7 +4,7 @@
 
 // Package scrypt implements the scrypt key derivation function as defined in
 // Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
-// Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf).
+// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
 package scrypt // import "golang.org/x/crypto/scrypt"
 
 import (
diff --git a/twofish/twofish.go b/twofish/twofish.go
index 376fa0e..6db01fc 100644
--- a/twofish/twofish.go
+++ b/twofish/twofish.go
@@ -5,7 +5,7 @@
 // Package twofish implements Bruce Schneier's Twofish encryption algorithm.
 package twofish // import "golang.org/x/crypto/twofish"
 
-// Twofish is defined in http://www.schneier.com/paper-twofish-paper.pdf [TWOFISH]
+// Twofish is defined in https://www.schneier.com/paper-twofish-paper.pdf [TWOFISH]
 
 // This code is a port of the LibTom C implementation.
 // See http://libtom.org/?page=features&newsitems=5&whatfile=crypt.
diff --git a/twofish/twofish_test.go b/twofish/twofish_test.go
index 303081f..ed6a1a8 100644
--- a/twofish/twofish_test.go
+++ b/twofish/twofish_test.go
@@ -69,7 +69,7 @@
 		[]byte{0x90, 0xAF, 0xE9, 0x1B, 0xB2, 0x88, 0x54, 0x4F, 0x2C, 0x32, 0xDC, 0x23, 0x9B, 0x26, 0x35, 0xE6},
 		[]byte{0x6C, 0xB4, 0x56, 0x1C, 0x40, 0xBF, 0x0A, 0x97, 0x05, 0x93, 0x1C, 0xB6, 0xD4, 0x08, 0xE7, 0xFA},
 	},
-	// These test are derived from http://www.schneier.com/code/ecb_ival.txt
+	// These tests are derived from https://www.schneier.com/code/ecb_ival.txt
 	{
 		[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 		[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},