PKC Flashcards

1
Q

Public key encryption

A
  • Proposed (in the open literature) by Diffie & Hellman in 1976
  • Each party has a public encryption key and a private decryption key
  • Computing the private key from the public key should be computationally infeasible
  • The public key need not be kept secret but it is also not necessarily known to everyone
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Public key cryptography

A

A Public Key Encryption Scheme {eKp :Kp ∈Κ} and {dKs :Ks ∈Κ}

has the the following property:

  • Knowing eKp and given cC,it is infeasible to find anmM,such thateKp(m) = c

eKp can be public information!

Advantage:

  • eKp can be communicated over unsecure channels

Disadvantage

  • eKp and dKs are computationally more expensive than in symmetric schemes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

PKI application

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

One way function

A

A function f: XY is called a one-way function if

xX:

1. Computing f(x) is „easy“,

2. Computing f -1(y) is „hard“ or „infeasible“

Example: modular cube roots

  1. Select primes p = 48611 and q = 53993
  2. Let n = pq = 2624653723 and X = {1,2,…,n-1}
  3. Definef:XYby f(x)=x3 modn Example: f(2489991) = 1981394214

It is easy to compute f(x), but computingf -1(y)is infeasible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Discrete exponentiation

A

Discrete exponentiation: h(x):= gx mod p

  • Discrete Logarithm Problem (DLP): givenyfind the logarithm

x so that y = gx mod p.

For a judicious choices of parameters p and g the DLP is difficult to solve and discrete exponentiation is a one-way function.

Discrete exponentiation is a useful primitive in the construction of cryptographic schemes but it is too slow for many applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

trapdoor functions

A

A trapdoor one-way function is a one-way function f where, given extra information (the trapdoor information) it is feasible to computef -1:

Given yImg(f), find an xX such that f(x) = y

Example 1:

- Select primes p = 48611 and q = 53993

  • Let n = pq = 2624653723 and X = {1,…,n-1}
  • Definef:XNasf(x)=x3 mod n
  • f(2489991) = 1981394214 (computing f is easy…)

Computing modular cube roots (f-1) is also easy if p and q are known (basic number theory)

Example 2:

  • *Factoring of large numbers (RSA):** Every positive integer N has a unique prime factorization, but it is hard to find.
  • *(Remark: checking if N is prime is (likely) easier.)**
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

RSA fundamentals

A
  • A prime number is an integer p > 1 whose only factors are 1 and p
  • Two natural numbers n and m are relatively prime if n and m have no common factor greater than 1; written: gcd(n,m)=1
  • For any natural number n, theEuler functionφ(n), is the number of positive integers less than n that are relatively prime to n

Example: φ(10) = 4 since 1, 3, 7, 9 are relatively prime to 10

1. For p a prime, φ(p) = p-1

  • 2. Forp,qprimes,φ(pq)=φ**(p)**⋅φ**(q*)
  • *(see any textbook on number theory for a proof)**

3. φ (p q)=(p-1) ⋅ (q-1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

RSA

A

1. Choose large primes p and q

2. Let n = p q

3. Choose a random encryptionexponent e such that 1 < e < φ(n), and e is relatively prime to φ(n)

φ(n) = (p-1) * (q-1)

4. Derive the decryption exponent d = e-1modφ(n)dise’s inverse (see Euler)

5. Kp= (n,e) and Ks= (n,d)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

RSA System:

A

RSA System:

eKp(x) =xe modn and dKs(c)=cd modn

Consider:

  • e* ⋅ d = 1 mod φ(n)
  • =* k⋅φ(n)+1 for some k

Then:

x ed mod n

= xk⋅ φ(n)+1mod n

= xxk⋅φ(n) modn

= x1 mod n

= x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

RSA summary

A

Public and private keys (e,n) and (d,n) are derived from two secret prime numbers

  • Keys are today typically 2048 Bits

Plaintext message is treated as a (large!) binary number

Encryption is exponentiation

  • c = xe mod n

To break the encryption, one must be able to factor large numbers

  • Hopefully not in P…

Decrpytion uses the trapdoor information d:

  • m = cd mod n
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

RSA: examples of real life pitfalls 1

A

RSA encryption: c = xe mod n

Plaintext: encoded as a natural number x < n

Simple encoding of short plain text as (very) small x

  • Possibility of a brute-force search for x
  • In case of using a small e (such as e=3): if xe < n, then invers is simply ex
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

RSA: examples of real life pitfalls 2

A

RSA encryption: c = xe mod n

Assume that x is 64 bit session key: 0 < x < 264

  • Attacker sees c
  • Assume that x = x1 * x2 with x1,x2<234 (prob. approx. 20%)
  • This means that c/x1e = x2e (mod n)

Build table c/1e, c/2e, .. 2/234 e (234 operations)
for x2 = 0, …, 234 test if x2e is in table (34 * 234 operations)

Total attack time << 264

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
A

RSA encryption is homomorphic:

RSA(m1 m2) = RSA(m1) RSA(m2) (mod n)

Chosen ciphertext attack to learn cipher text cm = RSA(m) for some random m

  • Assume that oracle decrypts any ccm for the attacker
  • Attacker may:
  1. Encrypt cr = RSA(r) for some arbitrary r
  2. Calculate c = cmcr
  3. Ask oracle to decrypt c (resulting in value of m*r)
  4. Calculate m = m*r * r-1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Elliptic curves cryptosystems

A
  • Analogs of existing public-key cryptosystems in which modular arithmetic is replaced by operations defined over elliptic curves
  • the security of elliptic curve cryptosystems relies on the underlying hard mathematical problems: Given two points G and Y on an elliptic curve such that

Y = kG (that is, Y is G added k times to itself), find the integer k.

(This problem is known as the elliptic curve discrete logarithm problem)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Elliptic curves for cryptography

A
  • Elliptic curve over finite field is a finite set of points
  • There is a (complicated) definition of an “addition” operation on these points
  • You can define an “integer multiplication” for points (2*P=P+P, 3*P=P+P+P, etc.)
  • Elliptic curve discrete logarithm problem: given P and k*P, it is difficult to find k

Cryptographic algorithms based on the discrete logarithm problem can be transformed into elliptic curve algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

PKI Trade offs

A

Public Key systems are computationally more expensive than symmetric systems

  • Algorithms are harder to implement
  • More powerful computers requ’d

There is a formal rationale of security

  • based on results of complexity theory

A principal needs one private key and one public key

  • n parties need O(n) keys to communicate (compare to symmetric systems…)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Digital Signatures

A

Protect authenticity of documents ‘signed by A’.
More precisely, a cryptographic mechanism for associating

documents with verification keys

A has a public verification key and a private signature key

A procedure is required for B to get an authentic copy of A’s public key

A has to protect the signature key and be sure that the key is only used as intended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Encryption with public key

A
19
Q

Digital Signature

A
20
Q

Electronic Signature vs Digital Signature

A

Digital signature: mathematical evidence linking a document to a public key

Electronic signatures: a security service for associating documents with legal persons

  • the link between a public key and a person has to be established by procedural means
  • This link can be recorded in a certificate

Certificates are not necessary for verifying digital signatures, verification keys are

21
Q

Digital signature misconceptions

A

Verification is decryption with the public key (as stated in X.509)

  • the output of ‘decrypt’ is of type ‘message’, the output of ‘verify’ is of type Boolean, …

A signature binds the signer A to the document

  • verification links document and verification key

Digital signatures are legally binding

  • even if recognized by law, digital signatures do not guarantee that there is a court with jurisdiction
22
Q

Non-repudiation

A

Non-repudiation: a technical term introduced to distinguish digital signatures from symmetric key authentication services (MAC), where the verifier has the key for generating the MAC

Calling digital signatures “irrefutable evidence” creates the erroneous impression that they cannot be repudiated in court

The legal system does not have the concept of “irrefutable evidence”

23
Q

Certificates

A

Today: a certificate is a signed document binding a subject (or “entity”) to other information; subjects can be people, keys, names,…

24
Q

Certification Authorities

A
  • Certificates are signed by an Issuer
  • Certification Authority (CA) is just another name for Issuer
  • Sometimes CA is used more narrowly for organizations issuing ID certificates
  • The application determines the technical and procedural ‘trust’ requirements a CA has to meet
  • Sometimes Trusted Third Party (TTP) is used as a synonym for CA
25
Q

Certificate data structure

A

Certificates are data structures that contain (at least)

  • Issuer identification (Distinguished Name – DN)
  • Subject identification (Distinguished Name)
  • Subject public key
  • Issuer digital signature

In order to be interoperable, we need standards that define an exchange format and management rules for certificates

26
Q

Certificate problems

A
  • How do you issue digital certificates?
  • Who will issue digital certificates?
  • Why should we trust the issuer of the digital certificate?
  • How can I revoke a certificate?
  • How can I check if a certificate is still valid?
  • How do I manage/store/use/protect the corresponding private key?
27
Q

PKI

A

The protocols, services and standards that facilitate the use of public-key cryptography by allowing the secure distribution of public keys between communicating parties.

PKI standards: X.509, PKCS

27
Q

PKI

A

The protocols, services and standards that facilitate the use of public-key cryptography by allowing the secure distribution of public keys between communicating parties.

PKI standards: X.509, PKCS

28
Q

X.509 PKI

A

several possible structures: hierarchical, multi-root, mesh, bridges

Finding verification paths becomes more challenging (may require handling dead ends, loops, etc.)

29
Q

PKI: Overview of Components

A
  • Certificates: Digitally signed data
  • Certificate Authority (CA)
  • Registration Authority (RA)
  • Certificate Revocation Lists (CRL)
  • Directory Service (e.g. LDAP)
  • Validation Service (VA)
  • Policies
  • Certificate Policy - CP
    (defines requirements, i.e.: what participants must do)
  • Certification Practice Statement - CPS
    (defines procedures and controls to meet these requirements)
30
Q

X.509 certificates

A

User certificate (public key certificate, certificate): the public key of a user, together with some information, rendered unforgeable by encipherment with the secret key of the certification authority which issued it

Attribute certificate: a set of attributes of a user together with some other information, digitally signed under the private key of the CA

Certification authority: an authority trusted by one or more users to create and assign certificates

31
Q

PKI life cycle

A

Key and certificate life cycle management

  • Note: key ≠ identity!

Phases:

  • Initialization: Generation and Issuance
  • Active: Usage
  • Cancellation
32
Q

PKI life cycle: Initialization 1

A

Initialization steps:

  • Registration via RA
  • Identity verification (according to policy)
  • Key pair generation
  • Certificate creation and delivery
33
Q

PKI life cycle: Initialization 2

A

Key pair generation: • Where?

  • RA
  • CA
  • Owner
  • Other trusted 3rd party
  • Only owner-generation provides non-repudiation property
  • In the past, simple devices (e.g., smart cards) not powerful enough
  • Today, usually no longer a problem
  • Dual key-pair model: separate keys for separate purposes e.g., encryption vs. signature
34
Q

PKI life cycle: Initialization 3

A

Certificate generation and distribution

  • Generation by CA
  • Distribution
  • directly to the user (certificate, private key)
  • to some public repository (certificate only)
35
Q

PKI life cycle: cancellation

A

“Natural cancellation“:
• Expiration of certificate lifetime

“Revocation“:
• Termination of certificate life before lifetime expires

36
Q

Revocation

A

Certificates may need to be revoked

  • if a corresponding private key is compromised
  • if a fact the certificate vouches for no longer is valid

Certification Revocation Lists (CRLs):

  • distributed in regular intervals or on demand
  • make sense if on-line checks are not possible or too expensive

When on-line checks are feasible, certificate status can be queried on-line:

  • Online Certificate Status Protocol - OCSP
  • positive lists in the German signature infrastructure
37
Q

Online Certificate Status Protocol

A
  1. Alice and Bob have public key certificates issued by Ivan (CA).
  2. Alice wishes to perform a transaction with Bob and sends him her public key certificate.
  3. Bob creates an ‘OCSP request’ that contains a fingerprint of Alice’s public key and sends it to Ivan.
  4. Ivan’s OCSP responder looks up the revocation status of Alice’s certificate (using the fingerprint Bob created) in his own CA database.
  5. Ivan’s OCSP responder confirms that Alice’s certificate is still OK, and returns a signed ‘OCSP response’ to Bob.
  6. Bob cryptographically verifies the signed response (He has Ivan’s public key) and ensures that it was produced recently.
  7. Bob completes the transaction with Alice.
38
Q

Certificate validation

A

Validation consists of the following steps:

  • Check integrity (by checking the signature)
  • Check for valid certification path to a trusted CA
  • Check if certificate is valid now (time constraints)
  • Check if certificate has not been revoked
  • Check if use is consistent with the policy
  • Check if certificate is issued for the right entity
39
Q

Security issues with PKIs

A

Who do you have to trust?

  • The CA itself
  • All entities with certifying authority on the verification path
  • Software on your computer
  • Might install new CA certificates
  • Might manipulate hostname -> IP mapping
40
Q

Security issues with PKIs 2

A

Mistakes do happen => need mechanism to fix mistakes

  • CRLs (Certficate Recovation Lists) Compromised CA
  • Wrongly issued certificates
  • Leaked private keys

Practical drawbacks:

  • CRL check is needed before any verification
  • CRL database must be online
  • CRL is central point of failure
41
Q

PKI Problems in Real Life

A

Lack of Applications

  • Integrating PKI into applications is difficult

Hierarchical Model of Trust

  • Conventional PKI assumes either that there is a single global name-space (i.e. world government, and a single, unique identifier imposed on every citizen of the world)
42
Q

Private Keys

A

Registration processes involve effort and expense

Underlying digital signatures and PKI is the assumption that the holder of a private key will be able to ensure its security

 There are difficulties in detecting that a private key has been subject to compromise

 There are further difficulties in implementing an effective revocation process. This is especially serious if retrospective revocation is permitted

 How can security-related actions communicated to users?

 Delegation