Professional Documents
Culture Documents
June 8, 2020
1
– n: φ(n) = (p-1)*(q-1) (as p and q are prime)
– d = e−1 such that e*d = 1 mod φ(n)
d ≡e−1 mod φ(n)
d ≡ 1e mod φ(n)
d ≡ 1+modφ(n)
e
d = 1+kφ(n)
e
for the smallest k N such that this expression is an
integral integer
for k = 1
d = 1+3798784
87
= 43664.1954
1+(2∗3798784)
d= 87
= 87328.3793, for k = 2
1+(3∗3798784)
d= 87
= 130992.563, for k = 3
...
d = 1+(38∗3798784)
87
= 1659239, for k = 38
Hence d = 1659239
– M’ = 2535811659239 mod n
Using the same approach we used to encrypt M, we have
– M’ = 2400527
c) Find out the certificate chain that provides TLS for https://www.google.com,
and draw the chain of CAs that includes all intermediate CAs and the root
CA, specifying their organization names (O) and canonical names (CN).
Certificate chain
2
1 s : C = US, O = Google Trust Services, CN = GTS CA
101
i : OU = Globalisation Root CA - R2, O = GlobalSign,
CN = GlobalSign
d) Extract the public key components (i.e. the exponent e and the modulus
n) from the X.509 certificate of www.tu-clausthal.de. Then use it to encrypt
the hexadecimal plaintext 011530. At last, provide the SHA3-256 hash of
the resulting ciphertext in hexadecimal representation.
By clicking on the lock in the address bar of my navigator-> View
certificate Dialog pops up with an "Export to File" button, which i use
to save the certificate as wwwtuclausthal.crt file.
Using the command line: openssl x509 -inform der -in wwwtu-
clausthal.crt -pubkey -noout > public key.pem, I copy the public
key in a .pem file
Using the command line: openssl rsa -pubin -in public key.pem
-text -noout, i obtain the exponent to be : 65537
3
Using the command line: openssl rsa -pubin -in public key.pem
-modulus -noout, i obtain the modulus in hexadecimal:
B3939225A8181110FDA5872889DC6B9FC97B108AE9B61
850460DC67E7220213F44A1CBC69A6669B34FBD5832335
8A7148B11938092F422E45942DD7754C8C2A9AAF0BAA5
D6EAD3F0C722AB634A0A7AAAF4D5AA514E615D4574C
96F648886597EB8C4975B342F1203AFCBA24EAB2B473C
16F068683E330B6326459700129DC894A16EE742EF0D27
4B3CA246A82E9128AF9A46151752F49B4416011C7161D9
1BD448CD3499D3347DAFDC1B9DEA164B330E14E6BF6
6E581308442A9480F74A96BF4F73D3543BE0ECB80F9600
F1B84B9A58BFE989CD992EE1827C0428AC4E9C19F069F
4E5AFD153E01CBAD251C5CE939CED2753395950DCA3
4525DBA0A1A0B301
The encryption operation of the hexadecimal plaintext 011530 is done
by using M: C = E(M) = Me mod n. Doing this we obtain the hex-
adecimal cipher :
– 2792b102456aa538807b30b8e2c2e67e02ffa5b78f61c
e205cc8e2e6d0cc51029f665bd1eb8b26fe888b2f1f098
ea7718296c178c95364194813df000bbfbbd7ead392ac
85434dd131802072e05ef5aab3c5e3876efbd23deeb77
e2be22cc7981a6070835c53c72ff686af711d330c737fd
c73ffd696109bd37db85ff5e6d6727dfd49e86f08de49a
f4a5c2ac5618e887599ee3e3b8fad102361989987c369
3097da951d2e49c7110ca4ef75ecb3741c2a72c917dcb
be54a00884842e3d804f21bf0bca88d85495b7062eab1
8d8e42c98da7799b9a1afdb189e14d6c715f87dd861c5
270236e48254e2ff1982ccac9dd6f6d17e7b247f844a32
784cf668940c0
See code file for the encryption.
The hash of the resulting ciphertext in hexadecimal representation is :
– SHA-3-256: 2916f4b43a9a01285ada14e9048ec
106a486c84ad6d7077604d58311be4e6e81
see code file for the hash