Transposition exercize To solve the symmetric cypher exercize with transposition, we can use the unix tool 'aspell' as an oracle, it will return the syntactically corrected version and the number of errors, and we can find the string with the minimum number of errors. Zipfile exercize We can look at the magic number (first 4 bytes) to distinguish which file is Then i can compare the encrypted header with the standard one and find the key (if it is 4bytes) or the first 4 bytes of the key (if it is longer).
##Keyspace and bruteforcing Halving the size of the key we are not halving the number of bruteforce attempts required because the number of attempts (or different keys) is exponential to the size of the key (#bits) We have to evaluate if the time and the money needed for bruteforcing is worth for the content i'm bruteforcing.
##Asymmetric encryption It is called asymmetric because we use two keys for encryptyng and decrypting respectively Contrary to the simmetric example, now the sender uses the public key of the recipient for encrypting and its private key for signing. Common asymmetric cyphers
We can use the exponentiation to compute the public key Y, but given Y it is practically impossible to find X (the secret key) In particular Pick p prime number, a primitive root of p Primitive root: a number a such that raising it to any number between 1 and p-1 and computing the modulo p we obtain each number between 1 and p-1 So Alice and Bob chooses a key: number between 1 and P-1 and compute the exponentiation: Ya^Xb mod p
Instead of using the modulo calculus, we can use two large prime numbers