summaryrefslogtreecommitdiffstats
path: root/challenge/c14.go
diff options
context:
space:
mode:
Diffstat (limited to 'challenge/c14.go')
-rw-r--r--challenge/c14.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge/c14.go b/challenge/c14.go
index 3b5b11c..4471f44 100644
--- a/challenge/c14.go
+++ b/challenge/c14.go
@@ -5,9 +5,12 @@ package challenge
import (
"fmt"
+
"ricketyspace.net/cryptopals/lib"
)
+var sheep byte = 65
+
func C14() {
blocksize := findBlockSizeForVarEncryptECB()
rpl, nrpb, rpo := findRandPrefixLen(blocksize)
@@ -32,6 +35,14 @@ func C14() {
fmt.Printf("Unknown String:\n%v", lib.BytesToStr(ds))
}
+func freshSheepBytes(n int) []byte {
+ in := make([]byte, n)
+ for i := 0; i < n; i++ {
+ in[i] = sheep
+ }
+ return in
+}
+
func findBlockSizeForVarEncryptECB() int {
in := make([]byte, 0)