You are on page 1of 9

Network Security

Netzwerksicherheit
Design Fundamentals
ET-IDA-082

Tutorial-15
X509

21.06.2022, v17
Prof. W. Adi

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 1
 W. Adi 2011
Certificate Notation
Y<<X>> = The certificate of user X issued by authority Y
Y{I} = signing of information I by Y
CA{Inf.} = the signing of Inf. by CA Name of
certified user

CA<<A>> = CA {V, SN, AI, CA, TA, A …, AP} = (V, SN … Ap) | EPK-CA[H(I)]

version Ser. No. Algorithm Signer Validity Public-key


Identifier time Information
certificate of user A
issued by Certification
Authority CA Signature:
Is the Public-key encrypted hash code H(I) using
the secret key of CA = EPK-CA[H(I)]

Where H(I) = H(V, SN, AI, CA, TA, A …, AP)

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 2
 W. Adi 2011
Reminder : One Way Single Authentication

(optional): session key


Timestamp
identity of B proposed by A, Enciphered
Prevents delayed delivery by public key of B (PKB)

A’s Signature
for all Information
in brackets
A { tA, rA, B, sgnData, EPKB[Kab] } = I || EPKB[ H(I) ]
Alice Bob
A Nonce B
PKB Information PKA
(to prohibit replay)
to be conveyed

• Establishes the identity (and only the identity) of A


• Proves that the message was generated by A
• Proves that the message was intended for B
• Establishes the integrity and originality of the message; presents credentials

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 3
 W. Adi 2011
P1: X.509 Authentication Protocol
1. Set up a sample simplified X.509 Certificates for A and B
2. Design a sample flow of a three-way X.509 Authentication Protocol
Notice:
 Use RSA scheme for Signatures.
 Use H(m) = m2 mod 53 as a hash function
 Assume A=13, B=21, CA=33
Assume and create your own simple necessary and adequate missing values to have a sample
operational protocol.

X.509 Three Way Authentication


A{tA, rA, B, sgnData, EPK-b [Kab]}

A B{tB, rB, A, rA, sgnData, EPK-a [Kba]}


B
A{rB}

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 4
 W. Adi 2011
Solution:
1. A and B Setup RSA for Signature
The modulus should be selected to allow encryption and decryption of the whole range of the hash values.
That is the range from 0 to 52 (Modulo 53). All modulus selected should be larger than 52.
USER A:
Na = pa . qa = 17x 5= 85 open modulus of A Open Directory
pa . qa = 7,5 two secret primes Na = 85
m u b1 b2 q r
PKA = Ea= 11 64 11 0 1 5 9
(Na) = (pa-1).(qa -1) = (17-1)(5-1) = 64 11 9 1 -5 1 2
9 2 -5 6 4 1
2 1 6 -29 2 0
Ea = open Encryption key of A =11
Da = SKA= Eb-1 [mod (Nb) ] = 11-1 mod 64 = -29=35

Open Directory
USER B:
Nb = pb . qb = 11x 5= 55 open modulus of B Nb = 55
pb . qb = 11,5 two secret primes PKB = Eb= 7

(Nb) = (pb-1).(qb -1) = (11-1)(5-1) = 40


m u b1 b2 q r
40 7 0 1 5 5
Eb = open Encryption key of B = 7 7 5 1 -5 1 2
Db = SKB= Eb-1 [mod (Nb) ] = 7-1 mod 40 = -17=23 5 2 -5 6 2 1
2 1 6 -17 2 0

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 5
 W. Adi 2011
Solution:
1. Certificates and Verification for A and B by CA using RSA Signature Scheme
The modulus should be selected to allow encryption and decryption of the whole range of the hash values.
That is the range from 0 to 52 (Modulo 53). All modulus selected should be larger than 52.
Certification Authority CA keys:
Open Directory: Verification key of CA certificates
Nca = pca . qca = 19 x 3 = 57 open modulus of CA
pca . qca = 19 and 3 are two secret primes Nca = 57 m u b1 b2 q r
known only by CA 36 29 0 1 1 7
PKCA = Eca= 29 29 7 1 -1 4 1
7 1 -1 5 7 0
(Nca) = (pa-1).(qa -1) = (19-1)(3-1) = 36

Eca = open Verification key of CA = 29


Dca = SK-CA = Eca-1 [mod (Nca) ] = 29-1 mod 36 = 5 (CA’s secret signing key)
ESK-CA[H(I)] = H(I)SK-CA mod 57
Certificates creation by CA:
CA<<A>> = CA {V, SN, AI, CA, TA, A …, AP} = (V, SN … Ap) | ESK-CA[H(I)]

User’s A Certificate: CA<<A>> = CA { 2, 101, 12, 33, 30, 13, 11} | 365 mod 57
CA<<A>> = CA { 2, 101, 12, 33, 30, 13, 11} | 6
V=2, SNa=101, AI=RSA=12, CA=33, TA=30, Apa=PKA=11 and H(I) = (21011233301311)2 mod 53 = 36

User’s B Certificate: CA<<B>> = CA { 2, 102, 12, 33, 30, 13, 7} | 155 mod 57
CA<<A>> = CA { 2, 102, 12, 33, 30, 13, 7} | 21
V=2, SNb=102, AI=RSA=12, CA=33,TB=30, Apb=PKB=7 and H(I) = (2102123330137)2 mod 53 = 15

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 6
 W. Adi 2011
Certificates Verification : sigA
B Verifying A’s Certificate: CA<<A>> = CA { 2, 101, 12, 33, 30, 13, 11} | 6
H(I) = (21011233301311)2 mod 53 = 36,
check if sigAPK-CA mod NCA = H(I) 629 mod 57 = 36 is true => PKA=11 is authentic
sigB
A Verifying B’s Certificate: CA<<B>> = CA { 2, 102, 12, 33, 30, 13, 7} | 21
H(I) = (2102123330137)2 mod 53 = 15,
check if sigBPK-CA mod NCA = H(I) 2129 mod 57 = 15 is true => PKB=7 is authentic

2. Runing X.509 Three Way Authentication


Setup timestamps, ra and, rb and sgnData
• tA=9 • rA=23 sgnData=55
• tB=10 • rB=40 EPK-b,a are not used by both parties

First path (1) :


A{tA, rA, B, sgnData, EPK-b [Kab]}
1
PKB=7 A B PKA=11

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 7
 W. Adi 2011
Message of the first path (1):
A{tA, rA, B, sgnData} = A{9, 23, 21} = (9, 23, 21) || Ha(I)SKA mod Na
= (9, 23, 21) || (25)35 mod 85
First path message = (9, 23, 21) || 70
Ha(I) = (9|| 23|| 21)2 mod 53
= (92321)2 mod 53 = 25
B{tB, rB, A, rA, sgnData}
Second path (2):
A{tA, rA, B, sgnData}
1
PKB=7 A B{tB, rB, A, rA, sgnData}
2 B PKA=11

Message of the second path (2):


B{tB, rB, A, rA, sgnData} = A{10, 40, 13, 23} = (10, 40, 13, 23) || Hb(I)SKB mod Nb
= (10, 40, 13, 23) || (29)23 mod 55
Second path message = (10, 40, 13, 23) || 24
Ha(I) = (10|| 40|| 13|| 23)2 mod 53
= (10401323)2 mod 53 = 29

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 8
 W. Adi 2011
Third path (3):

A{tA, rA, B, sgnData}


1
A B{tB, rB, A, rA, sgnData}
PKB=7
2 B PKA=11

A{rB} 3

Message of the third path (3):


A{rB} is a final message from A to B which contains a singed copy of the nonce rB.
A{rB} = rB || (rB)Da mod Na = 40 || (40)35 mod 85 = 40 || 80

Technical University of Braunschweig


IDA: Institute of Computer and Network Engineering Page : 9
 W. Adi 2011

You might also like