Public-Key Copy

Public-Key Copy

Public key cryptography and PKIs Shortcomings of symmetric key Establishing a pairwise key requires a key exchange, which requires both parties K K to be online Issue #1: Requires pairwise key exchanges File downloads Email / chat One-to-many: All-to-all: O(N) key O(N2) key exchanges exchanges Shortcomings of symmetric key Establishing a pairwise key requires a key exchange, which requires both parties K K to be online Issue #2: Parties must be online Blue user uploads a document, then goes File downloads offline (e.g., forever) Later, a yellow user wants One-to-many: to get a copy; how can O(N) key it know the copy is really exchanges from the blue user? Shortcomings of symmetric key Establishing a pairwise key requires a key exchange, which requires both parties K K to be online Issue #3: How do you know to whom you’re talking? Diffie-Hellman is resilient to eavesdropping, but not tampering vs K K K1 K1 K2 K2 A protocol that solves this with trust Trent: A trusted third party Alice Bob A protocol that solves this with trust Trent: A trusted third party KAT KBT Alice Bob KAT KBT 1. Everybody establishes a pairwise key with Trent Good: O(N) key exchanges A protocol that solves this with trust Trent: A trusted third party KAT KBT Alice Bob KAT KBT 1. Everybody establishes a pairwise key with Trent Good: O(N) key exchanges 2. Trent validates each user’s identity; includes in message Good: Authenticated communication A protocol that solves this with trust Trent: A trusted third party E(KAT, msg || to:Bob) KAT KBT Alice Bob KAT KBT 1. Everybody establishes a pairwise key with Trent Good: O(N) key exchanges 2. Trent validates each user’s identity; includes in message Good: Authenticated communication A protocol that solves this with trust Trent: A trusted third party E(KAT, msg || to:Bob) E(KBT, msg || from:Alice) KAT KBT Alice Bob KAT KBT 1. Everybody establishes a pairwise key with Trent Good: O(N) key exchanges 2. Trent validates each user’s identity; includes in message Good: Authenticated communication A protocol that solves this with trust Trent: A trusted third party E(KAT, msg || to:Bob) E(KBT, msg || from:Alice) KAT KBT Alice Bob KAT KBT 1. Everybody establishes a pairwise key with Trent Good: O(N) key exchanges 2. Trent validates each user’s identity; includes in message Good: Authenticated communication Bad: All messages get sent through Trent What are we trusting Trent not to do? Just as “secure” meant nothing without an attack model, “trusted” means nothing without a trust model E(KAT, msg || to:Bob) E(KBT, msg || from:Alice) KAT KBT Alice Bob KAT KBT What are we trusting Trent not to do? Just as “secure” meant nothing without an attack model, “trusted” means nothing without a trust model (Oh wow, “msg”!) E(KAT, msg || to:Bob) E(KBT, msg || from:Alice) KAT KBT Alice Bob KAT KBT 1. Do not read messages What are we trusting Trent not to do? Just as “secure” meant nothing without an attack model, “trusted” means nothing without a trust model E(KAT, msg || to:Bob) E(KBT, msg’ || from:Alice) KAT KBT Alice Bob KAT KBT 1. Do not read messages 2. Do not alter messages What are we trusting Trent not to do? Just as “secure” meant nothing without an attack model, “trusted” means nothing without a trust model …nothing… E(KBT, msg’ || from:Alice) KAT KBT Alice Bob KAT KBT 1. Do not read messages 2. Do not alter messages 3. Do not forge messages What are we trusting Trent not to do? Just as “secure” meant nothing without an attack model, “trusted” means nothing without a trust model E(KAT, msg || to:Bob) …. KAT KBT Alice Bob KAT KBT 1. Do not read messages 2. Do not alter messages 3. Do not forge messages 4. Do not go offline Public key encryption A public key encryption scheme comprises three algorithms Key generation G This is a randomized algorithm • Inputs (nondeterministic output) • Source of randomness • Maximum key length L Difficult to infer SK from PK • Outputs: a key pair Only one person should know SK; • PK = public key PK should be public to all • SK = secret key PK and SK are intrinsically bound together: for a given PK, there is a single corresponding SK Example: RSA’s public keys are a pair: (exponent, modulus) Public key encryption A public key encryption scheme comprises three algorithms Encryption E(PK, msg) This is a randomized algorithm • Inputs (vanilla RSA is deterministic; • Public key PK in practice, RSA-PKCS is used • Message msg of instead, which adds a nonce fixed size to the message) • Outputs: a cipher text c same size as msg PK a.k.a. “Encryption key” Anyone who knows Alice’s PK can encrypt a message to her… Public key encryption A public key encryption scheme comprises three algorithms Decryption D(SK, c) This is a deterministic algorithm • Inputs Should always return the • Secret key SK original message • Cipher text c • Outputs: original msg …but only Alice can decrypt that message Public key encryption A public key encryption scheme comprises three algorithms Correctness Key generation G → PK = public key D(SK, E(PK, m)) = m → SK = secret key Security Encryption E(PK, m) → cipher text c E(PK, m) should appear random (small change to (PK,m) leads to large changes to c) Decryption D(SK, c) → original msg E() should approximate a one-way trapdoor function: cannot invert without access to SK Protocols with public key encryption Goal: deliver a confidential message Symmetric key Email / chat All-to-all: O(N2) key exchanges Protocols with public key encryption Goal: deliver a confidential message Symmetric key Generate public/private key pair (PK,SK) Email / chat Annouce PK publicly (on website, in newspaper, …) All-to-all: O(N2) key exchanges Protocols with public key encryption Goal: deliver a confidential message Symmetric key Generate public/private key pair (PK,SK) Email / chat Annouce PK publicly (on website, in newspaper, …) Obtain PK Send c = E(PK, msg) All-to-all: O(N2) key exchanges Protocols with public key encryption Goal: deliver a confidential message Symmetric key Generate public/private key pair (PK,SK) Email / chat Annouce PK publicly (on website, in newspaper, …) Obtain PK Send c = E(PK, msg) All-to-all: O(N2) key Decrypt D(SK, c) = msg exchanges Protocols with public key encryption Goal: deliver a confidential message Symmetric key Generate public/private key pair (PK,SK) Email / chat Annouce PK publicly (on website, in newspaper, …) Obtain PK Send c = E(PK, msg) All-to-all: O(N2) key Decrypt D(SK, c) = msg exchanges O(N) keys in total Overcoming fixed message sizes Encryption E(PK, msg) • Inputs • Public key PK Like block ciphers, • Message msg of but there are not fixed size “modes” of public • Outputs: a cipher text c key encryption same size as msg Overcoming fixed message sizes Encryption E(PK, msg) • Inputs • Public key PK Like block ciphers, • Message msg of but there are not fixed size “modes” of public • Outputs: a cipher text c key encryption same size as msg Public key operations are slooooow! Overcoming fixed message sizes Encryption E(PK, msg) • Inputs • Public key PK Like block ciphers, • Message msg of but there are not fixed size “modes” of public • Outputs: a cipher text c key encryption same size as msg Public key operations are slooooow! Symmetric key operations are fast Hybrid encryption Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Obtain PK Generate symmetric key K Compute cmsg = e(K, msg) Compute cK = E(PK, K) Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Obtain PK Generate symmetric key K Symm key Compute cmsg = e(K, msg) Public key Compute cK = E(PK, K) Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Obtain PK Generate symmetric key K Symm key Compute cmsg = e(K, msg) Public key Compute cK = E(PK, K) Now throw away K Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Obtain PK Generate symmetric key K Symm key Compute cmsg = e(K, msg) Public key Compute cK = E(PK, K) Now throw away K Send cK || cmsg Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Obtain PK Generate symmetric key K Symm key Compute cmsg = e(K, msg) Public key Compute cK = E(PK, K) Now throw away K Send cK || cmsg Decrypt D(SK, cK) = K Decrypt d(K, cmsg) = msg Hybrid encryption Generate public/private key pair (PK,SK); publicize PK Obtain PK Generate symmetric key K Symm key Compute cmsg = e(K, msg) Public key Compute cK = E(PK, K) Now throw away K Send cK || cmsg Public key Decrypt D(SK, cK) = K Decrypt d(K, cmsg) = msg Symm key Hybrid encryption Obtain PK Generate symmetric key K Compute cmsg = e(K, msg) Compute cK = E(PK, K) Send cK || cmsg The easy key distribution of public key The speed and arbitrary message length of symmetric key Protocols with public key cryptography Goal: determine from whom a message came Symmetric key Ideally, a user (blue) could post a File downloads message (e.g., sensitive documents or a kernel update), and then go offline And downloaders (yellow) could subsequently infer the message’s authenticity without having to have One-to-many: already established a pairwise O(N) key key with the publisher exchanges Digital signatures A digital signature scheme comprises two algorithms Signing function Sgn(SK, m) • Inputs • Secret key SK • Fixed-length message • Outputs: a signature s Digital signatures A digital signature scheme comprises two algorithms Signing function Sgn(SK, m) This is a randomized algorithm (nondeterministic output) • Inputs • Secret key SK • Fixed-length message • Outputs: a signature s Digital signatures A digital signature scheme comprises two algorithms Signing function Sgn(SK, m) This is a randomized algorithm (nondeterministic output) • Inputs • Secret key SK SK a.k.a.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    156 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us