当前位置:网站首页>Close asymmetric key
Close asymmetric key
2022-06-12 08:36:00 【Month to month better】
This article is from my blog 《 Unified authentication in cloud computing ——SAML The basic chapter 》
New direction of cryptography
1976 year , Two distinguished scholars from Stanford University , After three years of cooperation , Published an article entitled 《 New Directions in Cryptography 》 The article . This paper introduces the concept of public key encryption protocol and digital signature for the first time . No one can think of , Just a few decades later , This article constitutes the cornerstone of modern Internet encryption protocols . These two handsome grandfathers and cute millet !!!
chart 1 《 New Directions in Cryptography 》 author ( This is from the Internet )
Unlike symmetric ciphers, which are based on a single shared key , Asymmetric passwords always appear in pairs : Public and private keys . Data encrypted by any one of these keys can only be decrypted by the other key . namely , Data encrypted by the private key can only be decrypted by the public key , Data encrypted by the public key can only be decrypted by the private key . This characteristic of asymmetric cryptography makes it widely used in the field of key exchange and digital signature .
Inspiration for key exchange
In network communication scenarios that require encryption , The most common encryption method is symmetric encryption based on shared key . The communication process is as follows :
The sender and receiver of the message agree on a symmetric key in advance K. then , The message sender uses the key K Encrypt the message to be sent , And send the encrypted result to the message receiver through the network . The message receiver uses the key K Decrypt the received content , And get the original message .
chart 2 Use shared key encryption for data transmission
Due to shared key K Held only by the sender and receiver of the message . therefore , Even if the data is hijacked during transmission , The attacker has no key K, The original message content is also unavailable .
But the problem is , How to agree the key in advance ? If the sender and receiver of the message are physically close , You can also agree on the key by meeting offline . But what if the two sides of the communication are eighteen thousand miles away ? obviously , The way of offline agreement is unrealistic . So can we find a safe way , Let the communication parties agree to share the key based on the network ?
chart 3 There will always be only one truth
There will always be only one truth : Key exchange using asymmetric cryptography mechanism . The message receiver generates a pair of public and private keys in advance , And public key PubK Broadcast out , Private key PriK Keep it for yourself . With this premise , The symmetric key can be agreed securely . The process is as follows :
The message sender obtains the information of the broadcast message receiver PubK, And use the PubK For the symmetric key to be transmitted K To encrypt , And the encrypted content is transmitted to the receiver through the network . The message receiver receives the encrypted content , Use the corresponding PriK Decrypt to get the symmetric key K.
chart 4 Key exchange using asymmetric cryptography mechanism
because PriK Held only by the receiving party . therefore , Even if the data is hijacked during transmission , The attacker has no private key PriK, The original message content is also unavailable . In this way , This solves the problem of symmetric key transmission !
Digital signature anti counterfeiting
In the process of key exchange , There is one step worth discussing : The message sender obtains the information of the broadcast message receiver PubK. This involves a certification issue , How to prove one PubK Is the recipient's PubK Well ? If hackers forge the recipient's PubK What do I do ? Just like the following picture .
chart 5 The hacker forges the public key of the receiver
There will always be only one truth : digital signature . So called digital signature , It is a credible authority that signs some data with its own private key ( Private key encryption is usually called signature ), To prove that these data can be trusted .
The authority uses its own private key to transfer the public key of the receiver PubK To sign , The message sender receives the signature , Decrypt the public key corresponding to the authority to verify the signature . If the verification passes , Describe the currently received PubK It's certified , Can be trusted . conversely , The attacker's public key is not authenticated , It's untrustworthy .
chart 6 The authority signs the information with its private key
It is signed by the private key of the authority , To ensure the PubK Reliability of the source . So who is the authority ? congratulations , You have grasped the essence of the problem . In the field of cryptography , There is always a problem of root trust . Is the most original trust , For example, the root certificate used in our browser is a typical example .
Digital certificates have many uses
Writing at this point , The concept of digital certificate is ready to come out ! digital certificate , Also known as public key certificate , Used to prove that a public key is used by an entity ( Usually people 、 An organization or service ) Held by . This is like comparison. , Your house property certificate is used to prove that the house is owned by you . Empathy , Your public key certificate is used to prove that the public key is held by you .
A digital certificate contains the following basic information : The version number of the certificate 、 Certificate serial number 、 The signature algorithm used 、 The identity of the issuer 、 The validity of the certificate 、 Public key 、 The identity of the public key holder . This information is used as signed data , Use the specified signature algorithm and CA The private key of , And add the result of the signature to the certificate . This constitutes a complete certificate . Typical structure of digital certificate :
chart 7 Typical structure of digital certificate
because CA The public key of the institution is advertised , Any organization or entity that uses CA The public key of the certificate verifies the validity of the signature in the certificate , Can prove that the current certificate is reliable . namely , The public key declared in the certificate is associated with the holder . meanwhile , The private key corresponding to the public key is uniquely held by the holder .
author : Yizhen
link :https://www.zhihu.com/question/366632381/answer/976426943
source : You know
The copyright belongs to the author . Commercial reprint please contact the author for authorization , Non-commercial reprint please indicate the source .
边栏推荐
- MSTP的配置与原理
- Bean的作用域
- What is the beauty of MES equipment management for enterprises?
- 处理异常数据
- Calling stored procedures in mysql, definition of variables,
- js中的数组
- Project sorting of niuke.com
- 安科瑞消防应急照明和疏散指示系统
- Principle and configuration of MPLS
- Hands on learning and deep learning -- Realization of linear regression from scratch
猜你喜欢

How to understand the production scheduling of APS system?

工厂的生产效益,MES系统如何提供?

电气火灾探测器对各用电回路进行实时监控

This article is required for the popularization of super complete MES system knowledge

FDA reviewers say Moderna covid vaccine is safe and effective for children under 5 years of age

What exactly is APS? You will know after reading the article

Loading font component loading effect

Beidou satellite navigation system foundation part 1

Database foundation -- normalization and relational schema

Figure neural network makes Google maps more intelligent
随机推荐
(p36-p39) right value and right value reference, role and use of right value reference, derivation of undetermined reference type, and transfer of right value reference
Specify 404 and 500 error reporting pages.
JVM学习笔记:三 本地方法接口、执行引擎
Installation series of ROS system (I): installation steps
动态创建表单并提交
正则校验用户名
Loading circling effect during loading
根据有效期显示距离当前还剩多少天有效期
进制GB和GiB的区别
Hands on deep learning -- image classification dataset fashion MNIST
Seurat package addmodulescore is used for bulk RNA SEQ data
深拷贝与浅拷贝的区别
2022.6.9-----leetcode.497
(p21-p24) unified data initialization method: List initialization, initializing objects of non aggregate type with initialization list, initializer_ Use of Lisy template class
X64dbg debugging exception_ ACCESS_ VIOLATION C0000005
Figure neural network makes Google maps more intelligent
Never use MES as a tool, or you will miss the most important thing
Where does the driving force of MES system come from? What problems should be paid attention to in model selection?
(p15-p16) optimization of the right angle bracket of the template and the default template parameters of the function template
超全MES系统知识普及,必读此文