diff options
Diffstat (limited to 'challenge')
| -rw-r--r-- | challenge/c01.go | 1 | ||||
| -rw-r--r-- | challenge/c02.go | 1 | ||||
| -rw-r--r-- | challenge/c03.go | 1 | ||||
| -rw-r--r-- | challenge/c10.go | 3 | ||||
| -rw-r--r-- | challenge/c11.go | 1 | ||||
| -rw-r--r-- | challenge/c12.go | 2 | ||||
| -rw-r--r-- | challenge/c13.go | 1 | ||||
| -rw-r--r-- | challenge/c14.go | 1 | ||||
| -rw-r--r-- | challenge/c15.go | 1 | 
9 files changed, 0 insertions, 12 deletions
| diff --git a/challenge/c01.go b/challenge/c01.go index 356e919..e5e5fe5 100644 --- a/challenge/c01.go +++ b/challenge/c01.go @@ -12,7 +12,6 @@ import (  func C1() {  	hex := "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"  	b64 := lib.HexToBase64(hex) -  	fmt.Printf("b64(0x%v) = %v\n", hex, b64)  } diff --git a/challenge/c02.go b/challenge/c02.go index bcbd690..2d9d69c 100644 --- a/challenge/c02.go +++ b/challenge/c02.go @@ -13,7 +13,6 @@ func C2() {  	a := "1c0111001f010100061a024b53535009181c"  	b := "686974207468652062756c6c277320657965"  	c := lib.FixedXOR(a, b) -  	fmt.Printf("XOR(%v ^ %v) = %v\n", a, b, c)  } diff --git a/challenge/c03.go b/challenge/c03.go index 9489ed4..e3ac89f 100644 --- a/challenge/c03.go +++ b/challenge/c03.go @@ -12,7 +12,6 @@ import (  func C3() {  	hs := "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"  	k, ds, scr := lib.XORCrackSingleKey(hs) -  	fmt.Printf("Key is '%c' (Score: %v)\n", k, scr)  	fmt.Printf("Decrypted string: %v\n", ds)  } diff --git a/challenge/c10.go b/challenge/c10.go index db44a75..f1e106f 100644 --- a/challenge/c10.go +++ b/challenge/c10.go @@ -82,15 +82,12 @@ kkIzWhQ5Rxd/vnM2QQr9Cxa2J9GXEV3kGDiZV90+PCDSVGY4VgF8y7GedI1h`)  		"f69f2445df4f9b17ad2b417be66c3710")  	key80038A := lib.HexStrToBytes("2b7e151628aed2a6abf7158809cf4f3c")  	iv80038A := lib.HexStrToBytes("000102030405060708090a0b0c0d0e0f") -  	cipher80038A := lib.AESEncryptCBC(plain80038A, key80038A, iv80038A)  	fmt.Printf("NIST SP 800-38A F.2.1 (has padding):\n%v\n",  		lib.PrettifyHexStr(lib.BytesToHexStr(cipher80038A))) -  	o, _ := lib.AESDecryptCBC(cipher80038A, key80038A, iv80038A)  	fmt.Printf("NIST SP 800-38A F.2.2:\n%v\n",  		lib.PrettifyHexStr(lib.BytesToHexStr(o))) -  	o, _ = lib.AESDecryptCBC(cipher, key, iv)  	fmt.Printf("Cryptopals Ch. 10:\n%v", lib.BytesToStr(o))  } diff --git a/challenge/c11.go b/challenge/c11.go index 211d48c..0a3f791 100644 --- a/challenge/c11.go +++ b/challenge/c11.go @@ -41,7 +41,6 @@ func C11() {  		}  		return out  	} -  	p := lib.StrToBytes("YellowSubmarine YellowSubmarine YellowSubmarine")  	fmt.Printf("Input: %v (%d)\n", p, len(p)) diff --git a/challenge/c12.go b/challenge/c12.go index 0308bd4..2c4103f 100644 --- a/challenge/c12.go +++ b/challenge/c12.go @@ -22,7 +22,6 @@ YnkK`  	encrypt := func(in []byte) []byte {  		return lib.AESEncryptECB(append(in, lib.Base64ToBytes(unknown)...), key)  	} -  	freshSheepBytes := func(n int) []byte {  		in := make([]byte, n)  		for i := 0; i < n; i++ { @@ -96,7 +95,6 @@ YnkK`  		}  		panic("not found!")  	} -  	if !isOracleUsingECB() {  		panic("oracle not using ecb mode")  	} diff --git a/challenge/c13.go b/challenge/c13.go index 130499d..e2f6231 100644 --- a/challenge/c13.go +++ b/challenge/c13.go @@ -85,7 +85,6 @@ func C13() {  		return encode(p)  	} -  	adminBlock := lib.BytesToStr(lib.Pkcs7Padding(lib.StrToBytes("admin"), 16))  	ep := profileFor("foo@abacus" + adminBlock)  	encryptedEP := encrypt(ep) diff --git a/challenge/c14.go b/challenge/c14.go index b35f2cd..adfadc8 100644 --- a/challenge/c14.go +++ b/challenge/c14.go @@ -126,7 +126,6 @@ YnkK`  		}  		panic("not found!")  	} -  	blocksize := findBlockSize()  	rpl, nrpb, rpo := findPrefixLen(blocksize)  	nbl, us_sz := findUnknownStringNumBlocksLength( diff --git a/challenge/c15.go b/challenge/c15.go index 389cfea..5e3eb75 100644 --- a/challenge/c15.go +++ b/challenge/c15.go @@ -31,7 +31,6 @@ func C15() {  	if err != nil {  		fmt.Printf("bad ice upadding failed: %s\n", err.Error())  	} -  	// Will fail.  	evil_ice := append(ice, []byte{1, 2, 3, 4}...)  	fmt.Printf("evil ice: %v\n", evil_ice) | 
