~artoj/cryptopals

92d4d696940524c6897d43a638b9ff718087c7fc — Arto Jonsson 4 years ago 88fa5d9
simplify project structure
26 files changed, 16 insertions(+), 16 deletions(-)

R cmd/s1c1/main.go => ex/s1c1/main.go
R cmd/s1c2/main.go => ex/s1c2/main.go
R cmd/s1c3/main.go => ex/s1c3/main.go
R cmd/s1c4/4.txt => ex/s1c4/4.txt
R cmd/s1c4/main.go => ex/s1c4/main.go
R cmd/s1c5/main.go => ex/s1c5/main.go
R cmd/s1c6/6.txt => ex/s1c6/6.txt
R cmd/s1c6/main.go => ex/s1c6/main.go
R cmd/s1c7/7.txt => ex/s1c7/7.txt
R cmd/s1c7/main.go => ex/s1c7/main.go
R cmd/s1c8/8.txt => ex/s1c8/8.txt
R cmd/s1c8/main.go => ex/s1c8/main.go
R cmd/s2c10/10.txt => ex/s2c10/10.txt
R cmd/s2c10/main.go => ex/s2c10/main.go
R cmd/s2c11/main.go => ex/s2c11/main.go
R cmd/s2c12/12.txt => ex/s2c12/12.txt
R cmd/s2c12/main.go => ex/s2c12/main.go
R cmd/s2c12/oracle.go => ex/s2c12/oracle.go
R cmd/s2c9/main.go => ex/s2c9/main.go
R internal/pkg/mode/cbc.go => mode/cbc.go
R internal/pkg/mode/cbc_test.go => mode/cbc_test.go
R internal/pkg/mode/ecb.go => mode/ecb.go
R internal/pkg/pad/pad.go => pad/pad.go
R internal/pkg/pad/pad_test.go => pad/pad_test.go
R internal/pkg/utils/utils.go => utils/utils.go
R internal/pkg/utils/utils_test.go => utils/utils_test.go
R cmd/s1c1/main.go => ex/s1c1/main.go +0 -0
R cmd/s1c2/main.go => ex/s1c2/main.go +0 -0
R cmd/s1c3/main.go => ex/s1c3/main.go +1 -1
@@ 5,7 5,7 @@ import (
	"fmt"
	"os"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/utils"
)

// relative letter frequencies in the English alphabet with some made-up weights

R cmd/s1c4/4.txt => ex/s1c4/4.txt +0 -0
R cmd/s1c4/main.go => ex/s1c4/main.go +1 -1
@@ 7,7 7,7 @@ import (
	"io/ioutil"
	"log"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/utils"
)

const InFile = "4.txt"

R cmd/s1c5/main.go => ex/s1c5/main.go +1 -1
@@ 3,7 3,7 @@ package main
import (
	"fmt"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/utils"
)

const (

R cmd/s1c6/6.txt => ex/s1c6/6.txt +0 -0
R cmd/s1c6/main.go => ex/s1c6/main.go +1 -1
@@ 7,7 7,7 @@ import (
	"log"
	"sort"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/utils"
)

const (

R cmd/s1c7/7.txt => ex/s1c7/7.txt +0 -0
R cmd/s1c7/main.go => ex/s1c7/main.go +1 -1
@@ 7,7 7,7 @@ import (
	"io/ioutil"
	"log"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/mode"
	"git.sr.ht/~artoj/cryptopals/mode"
)

const (

R cmd/s1c8/8.txt => ex/s1c8/8.txt +0 -0
R cmd/s1c8/main.go => ex/s1c8/main.go +1 -1
@@ 8,7 8,7 @@ import (
	"os"
	"sort"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/utils"
)

const (

R cmd/s2c10/10.txt => ex/s2c10/10.txt +0 -0
R cmd/s2c10/main.go => ex/s2c10/main.go +1 -1
@@ 7,7 7,7 @@ import (
	"io/ioutil"
	"log"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/mode"
	"git.sr.ht/~artoj/cryptopals/mode"
)

const (

R cmd/s2c11/main.go => ex/s2c11/main.go +3 -3
@@ 8,9 8,9 @@ import (
	"math/rand"
	"time"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/mode"
	"git.sr.ht/~artoj/cryptopals/internal/pkg/pad"
	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/mode"
	"git.sr.ht/~artoj/cryptopals/pad"
	"git.sr.ht/~artoj/cryptopals/utils"
)

type CipherMode int

R cmd/s2c12/12.txt => ex/s2c12/12.txt +0 -0
R cmd/s2c12/main.go => ex/s2c12/main.go +1 -1
@@ 6,7 6,7 @@ import (
	"fmt"
	"log"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/utils"
)

// Number of duplicates used as threshold in ECB detection

R cmd/s2c12/oracle.go => ex/s2c12/oracle.go +3 -3
@@ 7,9 7,9 @@ import (
	"io/ioutil"
	"log"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/mode"
	"git.sr.ht/~artoj/cryptopals/internal/pkg/pad"
	"git.sr.ht/~artoj/cryptopals/internal/pkg/utils"
	"git.sr.ht/~artoj/cryptopals/mode"
	"git.sr.ht/~artoj/cryptopals/pad"
	"git.sr.ht/~artoj/cryptopals/utils"
)

const (

R cmd/s2c9/main.go => ex/s2c9/main.go +1 -1
@@ 4,7 4,7 @@ import (
	"bytes"
	"fmt"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/pad"
	"git.sr.ht/~artoj/cryptopals/pad"
)

func main() {

R internal/pkg/mode/cbc.go => mode/cbc.go +0 -0
R internal/pkg/mode/cbc_test.go => mode/cbc_test.go +0 -0
R internal/pkg/mode/ecb.go => mode/ecb.go +0 -0
R internal/pkg/pad/pad.go => pad/pad.go +0 -0
R internal/pkg/pad/pad_test.go => pad/pad_test.go +0 -0
R internal/pkg/utils/utils.go => utils/utils.go +1 -1
@@ 5,7 5,7 @@ import (
	"fmt"
	"math/bits"

	"git.sr.ht/~artoj/cryptopals/internal/pkg/pad"
	"git.sr.ht/~artoj/cryptopals/pad"
)

// EncryptionOracle defines an oracle encryption function.

R internal/pkg/utils/utils_test.go => utils/utils_test.go +0 -0