Basic cryptography - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Basic cryptography

Description:

Random number generation is an important primitive in many cryptographic ... DES, Triple DES, IDES and AES. Symmetric Encryption classification. Stream ciphers. ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 24
Provided by: kalide
Category:

less

Transcript and Presenter's Notes

Title: Basic cryptography


1
Basic cryptography
2
Basic cryptography
  • Pseudorandom numbers and sequences.
  • Encryption and Decryption.
  • Symmetric Encryption.
  • Block ciphers.
  • Stream ciphers.
  • Asymmetric Encryption.
  • Hash functions.
  • Message Digest.
  • Digital signature.
  • Dual Signatures.
  • Blind Signatures.
  • Digital Certification.
  • Attacks on encryption schemes.
  • Attacks on protocols.

3
Pseudorandom numbers and sequences
  • Random number generation is an important
    primitive in many cryptographic mechanisms.
  • In cryptographic applications, one of the
    following steps must be performed
  • From a finite set of n elements (e.g., 1,
    2,,n), select an element at random.
  • From the set of all sequences (strings) of length
    m over some finite alphabet A of n symbols,
    select a sequence at random.
  • Generate a random sequence (string) of symbols of
    length m over a set of n symbols.

4
Pseudorandom numbers and sequences Cont
  • Example (random sequence generator) To generate a
    random sequence of 0s and 1s
  • A coin could be tossed with a head landing up
    recorded as a 1 and a tail as a 0.
  • It is assumed that the coin is unbiased, which
    means that the probability of a 1 on a given toss
    is exactly 1/2.
  • This method would be of little value in a system
    where random sequences must be generated quickly.

5
Encryption and Decryption
  • Plaintext is denoted by P.
  • Ciphertext is denoted by C.
  • The encryption function E operates on P to
    produce C.
  • E(P) C
  • The decryption function D operates on C to
    produce P.
  • D(C)P.
  • A cryptographic algorithm is also known as
    cipher.
  • Modern ciphers uses key K in both encryption and
    decryption
  • E(K, P)C
  • D(K,C)P.

6
Symmetric Encryption
  • Both parties must first possess a copy of a
    single secret key SK.
  • Most used symmetric encryption techniques
  • DES, Triple DES, IDES and AES.
  • Symmetric Encryption classification
  • Stream ciphers.
  • Block ciphers.

7
Block ciphers
  • A block cipher is an encryption scheme which
    breaks up the plaintext messages to be
    transmitted into strings (called blocks) of a
    fixed length, and encrypts one block at a time.
  • Most well-known symmetric-key encryption
    techniques are block ciphers.
  • Two important classes of block ciphers are
  • Substitution ciphers are block ciphers which
    replace symbols (or groups of symbols) by other
    symbols or groups of symbols.
  • Transposition ciphers which simply permutes the
    symbols in a block.

8
Stream ciphers
  • They are very simple block ciphers having block
    length equal to one.
  • What makes them useful is the fact that the
    encryption transformation can change for each
    symbol of plaintext being encrypted.
  • In situations where transmission errors are
    highly probable, stream ciphers are advantageous
    because they have no error propagation.
  • They can also be used when the data must be
    processed one symbol at a time (e.g., if the
    equipment has no memory or buffering of data is
    limited)

9
Asymmetric encryption
  • Was developed to solve the problem of key
    distribution with symmetric encryption.
  • Asymmetric encryption uses two keys, Pubic key PK
    which is published to everyone, and Secret
    (private) key SK which is never revealed.
  • Most used Asymmetric techniques
  • RSA and Elliptic curve.

10
Asymmetric encryption Cont
  • Formal description
  • In public-key encryption systems each entity A
    has a public key e and a corresponding private
    key d.
  • In secure systems, the task of computing d given
    e is computationally infeasible.
  • The public key defines an encryption
    transformation Ee, while the private key defines
    the associated decryption transformation Dd.
  • Any entity B wishing to send a message m to A
    obtains an authentic copy of As public key e,
    uses the encryption transformation to obtain the
    ciphertext c Ee(m), and transmits c to A.
  • To decrypt c, A applies the decryption
    transformation to obtain the original message m
    Dd(c).

11
Symmetric-key vs. public-key cryptography
  • Advantages of symmetric-key cryptography
  • Can be designed to have high rates of data
    throughput.
  • Keys for symmetric-key ciphers are relatively
    short.
  • symmetric-key ciphers can be composed to produce
    stronger ciphers. Simple transformations which
    are easy to analyze, but on their own weak, can
    be used to construct strong product ciphers.
  • Disadvantages of symmetric-key cryptography
  • In a two-party communication, the key must remain
    secret at both ends.
  • In a large network, there are many key pairs to
    be managed. Consequently, effective
    Key-management requires the use of an
    unconditionally trusted third party.

12
Symmetric-key vs. public-key cryptography Cont
  • Advantages of public-key cryptography
  • Only the private key must be kept secret.
  • The administration of keys on a network requires
    the presence of only a functionally trusted third
    party, which might only be required in an
    off-line manner, as opposed to in real time.
  • Depending on the mode of usage, a private
    key/public key remain unchanged for considerable
    periods of time, e.g., many sessions (even
    several years).
  • The key used to describe the public verification
    function is typically much smaller than for the
    symmetric-key counterpart.
  • In a large network, the number of keys necessary
    may be considerably smaller than in the
    symmetric-key scenario.
  • Disadvantages of public-key encryption
  • Throughput rates for the most popular public-key
    encryption methods are several orders of
    magnitude slower than the best known
    symmetric-key schemes.
  • Key sizes are typically much larger than those
    required for symmetric-key encryption.
  • No public-key scheme has been proven to be
    secure. The most effective public-key encryption
    schemes found to date have their security based
    on the presumed difficulty of a small set of
    number-theoretic problems.

13
Hash functions
  • A hash function is a computationally efficient
    function mapping binary strings of arbitrary
    length to binary strings of some fixed length,
    called hash-values.
  • For a hash function which outputs n-bit
    hash-values (e.g., n 128 or 160) and has
    desirable properties, the probability that a
    randomly chosen string gets mapped to a
    particular n-bit hash-value is 2n.
  • The basic idea is that a hash-value serves as a
    compact representative of an input string.
  • The most common cryptographic uses of hash
    functions are with digital signatures and for
    data integrity.

14
Message Digest
  • Message Digesting or Hashing is a technique used
    to insure integrity of the message (to find out
    if the message has been changed). Hash algorithms
    are one way function.
  • MAC Message Authentication Code, is generated as
    its faster to encrypt the small hash then the
    complete message.
  • MD5 and SHA are the most used hash functions.

15
Digital signature
  • The purpose of DS is to bind an entity identity
    to a message.
  • Signer is the entity who signed the message.
  • Verifier is the entity who receives the message
    and verify the DS.
  • DS requirements
  • Data origin authentication of the signer.
  • Non-repudiation.

16
Digital Signature Cont
  • Digital signatures in practice
  • Should be easy to compute by the signer (the
    signing function should be easy to apply)
  • Should be easy to verify by anyone (the
    verification function should be easy to apply)
  • Should have an appropriate lifespan, i.e., be
    computationally secure from forgery until the
    signature is no longer necessary for its original
    purpose.

17
Dual Signatures
  • Dual signatures are used to link an identity with
    the content of a particular message.
  • Used when a sender A wants to send 2 messages (m1
    and m2) to B (wants m1) and C (wants m2), while
    assuring both B and C that a second linked
    message exist.

M2
M1
Senders SK
Hash
Hash
Dual Sig
Digest1
Digest2
Hash
Sign
18
Blind Signatures
  • Its a method for allowing a person to sign a
    message without being able to see its content.
  • Its like signing the outside of an envelope
    (which contain a carbon paper) with the signature
    going through the envelop and signing the letter
    inside it.

Message
Envelope containing the Message and carbon paper
Blinding process
Sent to signer
Envelope removed
Signed envelope
Signed Message
19
Digital Certification
  • Digital Certificates are the electronic
    counterparts to passports or membership cards.
  • Digital Certificate used to prove identity.
  • Digital Certificates, bind an identity to a pair
    of electronic keys that can be used to encrypt
    and sign digital information.
  • A Digital Certificate is issued by a
    Certification Authority (CA) and signed with the
    CA's private key.
  • Certification Authorities
  • CA are trustworthy persons or organizations that
    issue certificates to applicants whose identity
    has in some way been verified by the CA.
  • Certificates are verified through a hierarchy of
    these CAs. Each certificate is linked to the
    certificate of the CA that signed it.
  • By following this hierarchy, or verification
    path, to a known, trusted CA, you can be assured
    that a certificate is valid.

20
Digital Certification Cont
  • The typical implementation of digital
    certification involves the following process
  • Alice sends a certification request containing
    her name and her public key to a CA.
  • The CA creates a special message (m) from Alice's
    request, which constitutes most of the data in
    the certificate.
  • The CA signs the message with its private key,
    obtaining a separate signature (sig) in the
    process.
  • Then the CA returns the message m and the
    signature sig to Alice the two parts together
    form a certificate.
  • Alice sends the certificate to Bob to convey
    trust in her public key.
  • Bob verifies the signature sig using the CA's
    public key. If the signature is verified, he
    accepts Alice's public key.

21
Digital Certification Cont
  • A Digital Certificate typically contains the
  • Owner's public key.
  • Owner's name.
  • Expiration date of the public key.
  • Name of the issuer the CA that issued the
    Digital Certificate.
  • Serial number of the Digital Certificate.
  • Digital signature of the issuer.

22
Attacks on encryption schemes
  • The objective of the following attacks is to
    systematically recover plaintext
    fromciphertext,or even more drastically, to
    deduce the decryption key.
  • A ciphertext-only attack is one where the
    attackers tries to deduce the decryption key or
    plaintext by only observing ciphertext. Any
    encryption scheme vulnerable to this type of
    attack is considered to be completely insecure.
  • A known-plaintext attack is one where the
    attackers has a quantity of plaintext and
    corresponding ciphertext. This type of attack is
    typically only marginally more difficult to
    mount.
  • A chosen-plaintext attack is one where the
    attackers chooses plaintext and is then given
    corresponding ciphertext. Subsequently, the
    attackers uses any information deduced in order
    to recover plaintext corresponding to previously
    unseen ciphertext.
  • An adaptive chosen-plaintext attack is a
    chosen-plaintext attack wherein the choice of
    plaintext may depend on the ciphertext received
    from previous requests.

23
Attacks on protocols
  • The following is a partial list of attacks which
    might be mounted on various protocols.
  • Known-key attack. In this attack an attacker
    obtains some keys used previously and then uses
    this information to determine new keys.
  • Replay attack. In this attack an attacker records
    a communication session and replays the entire
    session at some later point in time.
  • Impersonation. Here an attackers assumes the
    identity of one of the legitimate parties in a
    network.
  • Dictionary. This is usually an attack against
    passwords. Typically, a password is stored in a
    computer file as the image of an unkeyed hash
    function. When a user logs on and enters a
    password, it is hashed and the image is compared
    to the stored value. An attacker can take a list
    of probable passwords, hash all entries in this
    list, and then compare this to the list of true
    encrypted passwords with the hope of finding
    matches.
Write a Comment
User Comments (0)
About PowerShow.com