<commit_before><commit_msg>Add RSA encryption/decryption test<commit_after>package cryptopals

import (
	"math/big"
	"testing"
)

func TestRsa(t *testing.T) {
	priv := generateRsaPrivateKey(4096)
	pub := priv.publicKey()

	m1 := "Modular multiplicative inverse"
	enc := pub.encrypt(new(big.Int).SetBytes([]byte(m1)))
	dec := priv.decrypt(enc)
	m2 := string(dec.Bytes())

	if m1 != m2 {
		t.Fatalf("Expected %v, was %v", m1, m2)
	}
}
{'fraction_non_alphanumeric': 0.1712962962962963, 'fraction_numerical': 0.02546296296296296, 'mean_word_length': 4.931506849315069, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3890700', 'n_tokens_mistral': 178, 'n_tokens_neox': 170, 'n_words': 34}