Skip to content

Commit

Permalink
ciphertext generation is different per size
Browse files Browse the repository at this point in the history
  • Loading branch information
xuganyu96 committed Dec 11, 2023
1 parent a6de95e commit 6c93208
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions marvin-toolkit/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,41 @@ echo "RSA $size bit self-signed certificate is in" $(x509Cert $name)
echo

# Generate ciphertexts
PYTHONPATH=tlsfuzzer ./marvin-venv/bin/python ./step2.py \
-c rsa${size}/cert.pem -o rsa${size}_repeat \
--repeat ${repeat} --verbose \
no_structure no_padding=48 signature_padding=8 \
valid_repeated_byte_payload="246 0xff" \
valid_repeated_byte_payload="246 0x01" \
valid=48 header_only \
no_header_with_payload=48 zero_byte_in_padding="48 4" \
valid=0 valid=192 valid=246
case $size in
1024)
PYTHONPATH=tlsfuzzer ./marvin-venv/bin/python ./step2.py \
-c rsa1024/cert.pem -o rsa1024_repeat \
--repeat 100000 --verbose \
no_structure no_padding=48 signature_padding=8 \
valid_repeated_byte_payload="118 0xff" \
valid_repeated_byte_payload="118 0x01" \
valid=48 header_only \
no_header_with_payload=48 zero_byte_in_padding="48 4" \
valid=0 valid=118
;;
2048)
PYTHONPATH=tlsfuzzer ./marvin-venv/bin/python ./step2.py \
-c rsa2048/cert.pem -o rsa2048_repeat \
--repeat ${repeat} --verbose \
no_structure no_padding=48 signature_padding=8 \
valid_repeated_byte_payload="246 0xff" \
valid_repeated_byte_payload="246 0x01" \
valid=48 header_only \
no_header_with_payload=48 zero_byte_in_padding="48 4" \
valid=0 valid=192 valid=246
;;
4096)
PYTHONPATH=tlsfuzzer ./marvin-venv/bin/python ./step2.py \
-c rsa4096/cert.pem -o rsa4096_repeat \
--repeat 100000 --verbose \
no_structure no_padding=48 signature_padding=8 \
valid_repeated_byte_payload="502 0xff" \
valid_repeated_byte_payload="502 0x01" \
valid=48 header_only \
no_header_with_payload=48 zero_byte_in_padding="48 4" \
valid=0 valid=192 valid=502
;;
esac

# Run decryptions and analyze data
echo "Starting decryption"
Expand Down

0 comments on commit 6c93208

Please sign in to comment.