SlideShare una empresa de Scribd logo
1 de 3
Basic ideas – digital signatures
•    A key-pair is created – a public and private key       Pv
•    You keep the private key
                                                                  Pu
•    Anyone can have the public key.



                                                                   Anyone could read
                                                                  them, but they could
                                                                  only have come from
    Pv     •   Messages encrypted with the private key can be             you
               decrypted with the public key

           •   Messages encrypted with the public key can be
    Pu
               decrypted with the private key                       Only you can read
                                                                  them, but they could
                                                                 have come from anyone
So: – how do we have the best of both worlds –
messages that only you can read and only one
      specific person could have created?
First approach.

•   Sender writes a little message to you. “Hi this
    message is from Sam”. They encrypt this message
    with their private key and add the result to the main
    message.

•   They then encrypt the whole resulting message
    with your public key – and send it to you.

•   Anyone intercepting the message can’t read it
    because they don’t have your private key.                 Could have
                                                              been copied
                                                             from another
                                                                message
•   When you decrypt the message, you find this extra
    bit. You use the senders public key to decrypt that.
    If you have a good message .. It tells you ----- what?
So: – how do we have the best of both worlds –
messages that only you can read and only one
      specific person could have created?
Better approach.

•   Signature message is a HASH of the overall
    message – valid only for this message.
    Encrypted with their private key as before

•   Steps two and three are the same, the message
    is secure.

•   When you decrypt the message, you find this        Could have
                                                       been copied
    hash. You use the senders public key to decrypt   from another
    it. Now you calculate the hash yourself, using       message

    the same algorithm. If the two hashes
    match, you have a valid, signed message.

Más contenido relacionado

Más de grahamwell (20)

What is binary and why do we use it?
What is binary and why do we use it?What is binary and why do we use it?
What is binary and why do we use it?
 
Introduction to touch develop
Introduction to touch developIntroduction to touch develop
Introduction to touch develop
 
Introduction to touch develop
Introduction to touch developIntroduction to touch develop
Introduction to touch develop
 
The software story
The software storyThe software story
The software story
 
Turtle graphics
Turtle graphicsTurtle graphics
Turtle graphics
 
Database field types
Database field typesDatabase field types
Database field types
 
Databases 101
Databases 101Databases 101
Databases 101
 
Kodu controls
Kodu controlsKodu controls
Kodu controls
 
Pascal names and types
Pascal names and typesPascal names and types
Pascal names and types
 
Python part two names and types
Python part two names and typesPython part two names and types
Python part two names and types
 
Abstraction - Year 9
Abstraction - Year 9Abstraction - Year 9
Abstraction - Year 9
 
Thinking about your project
Thinking about your projectThinking about your project
Thinking about your project
 
The rail fence
The rail fenceThe rail fence
The rail fence
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Rsa encryption
Rsa encryptionRsa encryption
Rsa encryption
 
Server side scripts
Server side scriptsServer side scripts
Server side scripts
 
Revision topic 1 sensors and control
Revision topic 1 sensors and controlRevision topic 1 sensors and control
Revision topic 1 sensors and control
 
Mtslesson
MtslessonMtslesson
Mtslesson
 
Hashing
HashingHashing
Hashing
 
Hashing
HashingHashing
Hashing
 

Basic ideas – digital signatures

  • 1. Basic ideas – digital signatures • A key-pair is created – a public and private key Pv • You keep the private key Pu • Anyone can have the public key. Anyone could read them, but they could only have come from Pv • Messages encrypted with the private key can be you decrypted with the public key • Messages encrypted with the public key can be Pu decrypted with the private key Only you can read them, but they could have come from anyone
  • 2. So: – how do we have the best of both worlds – messages that only you can read and only one specific person could have created? First approach. • Sender writes a little message to you. “Hi this message is from Sam”. They encrypt this message with their private key and add the result to the main message. • They then encrypt the whole resulting message with your public key – and send it to you. • Anyone intercepting the message can’t read it because they don’t have your private key. Could have been copied from another message • When you decrypt the message, you find this extra bit. You use the senders public key to decrypt that. If you have a good message .. It tells you ----- what?
  • 3. So: – how do we have the best of both worlds – messages that only you can read and only one specific person could have created? Better approach. • Signature message is a HASH of the overall message – valid only for this message. Encrypted with their private key as before • Steps two and three are the same, the message is secure. • When you decrypt the message, you find this Could have been copied hash. You use the senders public key to decrypt from another it. Now you calculate the hash yourself, using message the same algorithm. If the two hashes match, you have a valid, signed message.