diff --git a/cw/cw.tex b/cw/cw.tex index 81e2736..fa7bafb 100644 --- a/cw/cw.tex +++ b/cw/cw.tex @@ -72,7 +72,7 @@ Once you find a key that is the same length as the cipher text, we know that we found the right key. \section*{2} - \section*{2.1} + \subsection*{2.1} Ciphertext: 6cea122f3b42975bdbbeb7f2c6efaf9fd5a54fdd62\textbf{3c}27\textbf{6f}55358f4fbcb7a9492d0451b7019c69faef5fd23103ff7ec521fbbc6516ca2cb2ca663d5dbff86bcf @@ -94,15 +94,34 @@ $$\text{After Encrytion}\oplus\text{Previous Block Original Ciphertext}=\text{PlainText}\iff\text{After Encryption}=\text{Previous Block Original Ciphertext}\oplus\text{PlainText}$$ After we calculate the value that comes out of the encryption function and before we xor with the previous block we can now calculate the value that we need to change the previous block in the cipher text to: $$\text{After Encrytion}\oplus\text{Previous Block Altered Ciphertext}=\text{Altered PlainText}\iff\text{Previous Block Altered Ciphertext}=\text{After Encrytion}\oplus\text{Altered PlainText}$$ - \subsction*{2.2} + \subsection*{2.2} The block before the block where the change appens becomes altered as well. - \subsction*{2.3} + \subsection*{2.3} The change is similiar to the one described in 2.1 but with the iv value instead of the previous block $$\text{After Encrytion}\oplus\text{Original IV value}=\text{PlainText}\iff\text{After Encryption}=\text{Original IV value}\oplus\text{PlainText}$$ After we calculate the value that comes out of the encryption function and before we xor with IV value we can now calculate the value that we need to change the IV value to: $$\text{After Encrytion}\oplus\text{New IV value}=\text{Altered PlainText}\iff\text{New IV value}=\text{After Encrytion}\oplus\text{Altered PlainText}$$ \subsection*{2.4} You can not change the location word "station'', because the word is spread between 2 blocks which means that to change the second part of the word "ion'', you need to change the previos block but by changing the previous block the rest of the word "stat'' would have become garbled. + \section*{3} + \subsection*{3.1} + The computational hard problem is factorization + \subsection*{3.2} + I used factorization to obatin the cipher text is "handlebars'' + \subsection*{3.3} + I used the general number sieve to factorize\cite{cadonfs} to factorize the public modulus and obtained: + $$p=112546167358047505471958486197519319605436748416824057782825895564365669780011$$ + and + $$q=65802972772386034028625679514602920156340140357656235951559577501150333990623$$ + with p and q I calculated + $$d=1545653943570564246212141988589994139279645559486726912293297140150091598977726717239879077953798120855868459360771804433616650588668281034152580212290153$$ + with d you can decrypt the ciphertext + I used the openssl crypto libaray with the $p,q,d,m,e$ to decrypt the cipher text + \subsection*{3.4} + While factorizing the numbers takes more time, then a dictionary attack, it allows me to decrypting any message that was encrypted with this public key. It also allows me to decrypt messages that have diferent padding including padding methods that use random values. + \subsction*{3.5} + Yes, since I know the private key I can just decrypt the message. + \section*{5} \subsection*{5.1} The hash function is collision resistante for $n=1$, since if the block size is one the hash function is the encryption. Therefore: @@ -227,10 +246,8 @@ If r is not changed then we could submit to the oracle (1,0) and (2,0) and if the oracle gives us 2 cipher texts that are the same then we know that b = 1 and if they are different then we know its b=0 therefore not changing the r is not secure. - - - - + \section*{References} + \printbibliography[heading=none] \end{document} diff --git a/main.bib b/main.bib index 0a12439..7d200fd 100644 --- a/main.bib +++ b/main.bib @@ -1,104 +1,8 @@ -@online{google-vision-api, - author ={Google}, - title ={Vision AI | Google Cloud}, - year ={2023}, - url ={https://cloud.google.com/vision?hl=en} -} - -@article{amazon-rekognition, - author ={Amazon}, - title ={Image Recognition Software - ML Image \& Video Analysis - Amazon Rekognition - AWS}, - year ={2023}, - url ={https://aws.amazon.com/rekognition/} -} -@article{lecun1989handwritten, - title={Handwritten digit recognition with a back-propagation network}, - author={LeCun, Yann and Boser, Bernhard and Denker, John and Henderson, Donnie and Howard, Richard and Hubbard, Wayne and Jackel, Lawrence}, - journal={Advances in neural information processing systems}, - volume={2}, - year={1989} -} -@article{krizhevsky2012imagenet, - title={Imagenet classification with deep convolutional neural networks}, - author={Krizhevsky, Alex and Sutskever, Ilya and Hinton, Geoffrey E}, - journal={Advances in neural information processing systems}, - volume={25}, - year={2012} -} -@article{fukushima1980neocognitron, - title={Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position}, - author={Fukushima, Kunihiko}, - journal={Biological cybernetics}, - volume={36}, - number={4}, - pages={193--202}, - year={1980}, - publisher={Springer} -} -@misc{tensorflow2015-whitepaper, -title={ {TensorFlow}: Large-Scale Machine Learning on Heterogeneous Systems}, -url={https://www.tensorflow.org/}, -note={Software available from tensorflow.org}, -author={ - Mart\'{i}n~Abadi and - Ashish~Agarwal and - Paul~Barham and - Eugene~Brevdo and - Zhifeng~Chen and - Craig~Citro and - Greg~S.~Corrado and - Andy~Davis and - Jeffrey~Dean and - Matthieu~Devin and - Sanjay~Ghemawat and - Ian~Goodfellow and - Andrew~Harp and - Geoffrey~Irving and - Michael~Isard and - Yangqing Jia and - Rafal~Jozefowicz and - Lukasz~Kaiser and - Manjunath~Kudlur and - Josh~Levenberg and - Dandelion~Man\'{e} and - Rajat~Monga and - Sherry~Moore and - Derek~Murray and - Chris~Olah and - Mike~Schuster and - Jonathon~Shlens and - Benoit~Steiner and - Ilya~Sutskever and - Kunal~Talwar and - Paul~Tucker and - Vincent~Vanhoucke and - Vijay~Vasudevan and - Fernanda~Vi\'{e}gas and - Oriol~Vinyals and - Pete~Warden and - Martin~Wattenberg and - Martin~Wicke and - Yuan~Yu and - Xiaoqiang~Zheng}, - year={2015}, -} -@misc{chollet2015keras, - title={Keras}, - author={Chollet, Fran\c{c}ois and others}, - year={2015}, - howpublished={\url{https://keras.io}}, -} -@misc{htmx, - title = {{{$<$}/{$>$} htmx - high power tools for html}}, - year = {2023}, - month = nov, - note = {[Online; accessed 1. Nov. 2023]}, - url = {https://htmx.org} -} -@misc{go, - title = {{The Go Programming Language}}, - year = {2023}, - month = nov, - note = {[Online; accessed 1. Nov. 2023]}, - url = {https://go.dev} +@misc{cadonfs, + author={The CADO-NFS Development Team}, + title={{CADO-NFS}, An Implementation of the Number Field Sieve + Algorithm}, + note={Release 2.3.0}, + year={2017}, + url={http://cado-nfs.inria.fr/} }