Monday, August 24, 2015

[Design] Cryptographic standard, AES and RSA - Shuatiblog.com



[Design] Cryptographic standard, AES and RSA - Shuatiblog.com

3 areas of cryptographic standard:

  1. encryption standard

    1. Data Encryption Standard (obsolete)
    2. Triple DES
    3. Advanced Encryption Standard (AES)
    4. RSA
    5. OpenPGP
    6. CipherSaber
  2. hash standard

    1. MD5
    2. SHA-1
    3. SHA-2
    4. HMAC
    5. PBKDF2
  3. digital signature standard

    1. Digital Signature Algorithm (DSA)
    2. RSA
    3. Elliptic

Symmetric-key algorithm

Use the same cryptographic keys for both encryption and decryption.

The keys represent a shared secret between two parties, and maintain a private information link.

This requirement that both parties have access to the secret key is one of the main drawbacks.

Public-key cryptography

The public key is used:

  1. encrypt plaintext
  2. verify a digital signature

private key is used:

  1. decrypt ciphertext
  2. create a digital signature.

Encryption standard

RSA Vs. AES

RSA is very computationally expensive by comparison with AES. It involves mathematics with very large numbers, whilst AES can be implemented with relatively simple bit operations.

RSA is a public-key encryption algorithm (asymmetric), while AES is a symmetric key algorithm. Often a cryptosystem will use both algorithms.

A good compromise is to use RSA to encrypt the symmetric key that is then used in AES encryption of the larger data.

GitHub

uses RSA encryption.

hash standard

MD5

The MD5 message-digest algorithm is a widely used cryptographic hash function producing a 128-bit (16-byte) hash value, or 32 digit Hex.

d –> 8277e0910d750195b448797616e091ad

good morning –> 2b849500e4585dab4196ec9a415edf8f

SHA-1

SHA-1 produces a 160-bit (20-byte) hash value, or 40 digit Hex.

For more

About MD5, SHA-1 and other, refer to [Design] Cryptographic Hash, MD5 and Digital Signature

digital signature standard

A valid digital signature gives a recipient confidence that the message was created by a known sender.

commonly used for software distribution, financial transactions

To create a digital signature, signing software (such as an email program) creates a one-way hash of the data to be signed. The private key is then used to encrypt the hash.

The reason for encrypting the hash instead of entire message is that a hash function can convert an arbitrary input into a fixed length value, which is usually much shorter.

Other party validate the integrity of the data by using the signer's public key to decrypt the hash.

Note: you can choose to ' Add digital signature to this message ' in Microsoft Office.


Read full article from [Design] Cryptographic standard, AES and RSA - Shuatiblog.com

Labels

Review (572) System Design (334) System Design - Review (198) Java (189) Coding (75) Interview-System Design (65) Interview (63) Book Notes (59) Coding - Review (59) to-do (45) Linux (43) Knowledge (39) Interview-Java (35) Knowledge - Review (32) Database (31) Design Patterns (31) Big Data (29) Product Architecture (28) MultiThread (27) Soft Skills (27) Concurrency (26) Cracking Code Interview (26) Miscs (25) Distributed (24) OOD Design (24) Google (23) Career (22) Interview - Review (21) Java - Code (21) Operating System (21) Interview Q&A (20) System Design - Practice (20) Tips (19) Algorithm (17) Company - Facebook (17) Security (17) How to Ace Interview (16) Brain Teaser (14) Linux - Shell (14) Redis (14) Testing (14) Tools (14) Code Quality (13) Search (13) Spark (13) Spring (13) Company - LinkedIn (12) How to (12) Interview-Database (12) Interview-Operating System (12) Solr (12) Architecture Principles (11) Resource (10) Amazon (9) Cache (9) Git (9) Interview - MultiThread (9) Scalability (9) Trouble Shooting (9) Web Dev (9) Architecture Model (8) Better Programmer (8) Cassandra (8) Company - Uber (8) Java67 (8) Math (8) OO Design principles (8) SOLID (8) Design (7) Interview Corner (7) JVM (7) Java Basics (7) Kafka (7) Mac (7) Machine Learning (7) NoSQL (7) C++ (6) Chrome (6) File System (6) Highscalability (6) How to Better (6) Network (6) Restful (6) CareerCup (5) Code Review (5) Hash (5) How to Interview (5) JDK Source Code (5) JavaScript (5) Leetcode (5) Must Known (5) Python (5)

Popular Posts