[Solved] CSC482 Homework12-Secret Key Encryption
5.0
1 customer review
Digital download
Digital download
$25.00
Message us on WhatsApp for payment or download support.
| $ tr abcdefghijklmnopqrstuvwxyz sxtrwinqbedpvgkfmalhyuojzc < plaintext.txt > ciphertext.txt |
| $ openssl enc -ciphertype -e -in plain.txt -out cipher.bin -K 00112233445566778889aabbccddeeff -iv 0102030405060708 |
| -in <file> | input file |
| -out <file> | output file |
| -e | encrypt |
| -d | decrypt |
| -K/-iv | key/iv in hex is the next argument |
| -[pP] | print the iv/key (then exit if -P) |
| $ hexdump -C p1.txt00000000 31 32 33 34 35 36 37 38 39 49 4a 4b 4c 0a | |123456789IJKL.| |
| $ xxd p1.txt00000000: 3132 3334 3536 3738 3949 4a4b 4c0a | 123456789IJKL. |
| Key (in hex): 00112233445566778899aabbccddeeff (known only to Bob)Ciphertext (C1): bef65565572ccee2a9f9553154ed9498 (known to both) IV used on P1 (known to both)(in ascii): 1234567890123456(in hex) : 31323334353637383930313233343536 Next IV (known to both)(in ascii): 1234567890123457(in hex) : 31323334353637383930313233343537 |
| IV (in hex format): | aabbccddeeff00998877665544332211 |
| $ echo -n This is a top secret. > plaintext.txt$ echo -n example######### > key$ xxd -p key6578616d706c65232323232323232323$ openssl enc -aes-128-cbc -e -in plaintext.txt -out ciphertext.bin -K 6578616d706c65232323232323232323 -iv 010203040506070809000a0b0c0d0e0f $ xxd -p ciphertext.bin e5accdb667e8e569b1b34f423508c15422631198454e104ceb658f5918800c22 |