公私钥加解密问题汇总

2023-11-05 03:32
文章标签 问题 汇总 加解密 公私

本文主要是介绍公私钥加解密问题汇总,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

  1. A is sending a message to B (using public key infrastructure). What kind of key is used for encryption (for the purpose of confidentiality)?
    B’s public key.
    加密用接收方公钥

  2. A is sending a message to B (using public key infrastructure). What kind of key is used for encryption (for the purpose of authentication)?
    A’s private key.
    验证用发送方私钥

  3. Which question (#1 or #2) is related to digital signature? Explain in detail.
    #2, true party’s public key to authenticate.

  4. A is sending a message to B using a symmetric key encryption. Explain the mechanism including key sharing.
    A will use B’s public to encrypt the symmetric key, B can use its own private key to decrypt it.

    4-1. Explain what digital envelope is in Question 4.
    Digital envelope is the method to use symmetric key encryption to encrypt document but public key encryption to encrypt and send symmetric key, just like to put a key into an envelope.

  5. How do you verify digital signature? Especially what information do you need for verification? Discuss it in detail
    The receiver gets the massage and he/she will decrypt first and hash the plaintext with the same hashing algorithm the sender used; and then decrypt the DS with the true party’s public key. If the 2 match, the message is authenticated.
    Third party?

  6. How can hashing be used to achieve integrity? Explain with an example.
    Integrity means that the message cannot be changed or, if it is changed, that this change will be detected. The hashing is using a method to calculate and it will generate shorter length message which cannot be reversed, if the both sides can use the same hashing method generate the same result, that means the both sides achieve the integrity.

  7. Can you use hashing for authentication? Why or why not. Explain in detail.
    Yes, the MS-CHAP Challenge-Response Authentication Protocol using hashing to authenticate.

  8. A is sending a message to B. A and B agree that digital signature(Q2), digital certificate(Q5), and digital envelope(Q4) need to be used. Describe the detailed mechanism to use those three notions in their communication.
    整个传递过程是:
    (1)发送方A先形成DS(MD+发送方私钥加密),将DS attach到 plaintext上,形成 DS+plaintext,然后在用symmetric key加密;
    (2)发送给接收方B;
    (3)B接收到信息,先用symmetric key解密,然后再验证DS。即,先用true party的public key解密。其实这里的key来自于第三方的CA,而CA也相当于一套公私钥加解密机制,但是是早就install在你的OS里面了,这个部分就叫做数字证书。然后解密得到MD,再自己hash plaintext得到一个MD,比较得出完整性和验证发送者。
    这里写图片描述
    这里写图片描述
    这里写图片描述
    这里写图片描述

  9. Message-by-Message Authentication?
    不必每一个message都验证,可以在上层控制,类似于流机制

  10. HMAC
    这里写图片描述
    这里写图片描述
    这里写图片描述

  11. symmetric key加密发送的时候,因为已经用了PKI机制,不用再加DS。

这篇关于公私钥加解密问题汇总的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!


原文地址:
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.chinasem.cn/article/347143

相关文章

SpringBoot应用中出现的Full GC问题的场景与解决

《SpringBoot应用中出现的FullGC问题的场景与解决》这篇文章主要为大家详细介绍了SpringBoot应用中出现的FullGC问题的场景与解决方法,文中的示例代码讲解详细,感兴趣的小伙伴可... 目录Full GC的原理与触发条件原理触发条件对Spring Boot应用的影响示例代码优化建议结论F

MySQL 中查询 VARCHAR 类型 JSON 数据的问题记录

《MySQL中查询VARCHAR类型JSON数据的问题记录》在数据库设计中,有时我们会将JSON数据存储在VARCHAR或TEXT类型字段中,本文将详细介绍如何在MySQL中有效查询存储为V... 目录一、问题背景二、mysql jsON 函数2.1 常用 JSON 函数三、查询示例3.1 基本查询3.2

Pyserial设置缓冲区大小失败的问题解决

《Pyserial设置缓冲区大小失败的问题解决》本文主要介绍了Pyserial设置缓冲区大小失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录问题描述原因分析解决方案问题描述使用set_buffer_size()设置缓冲区大小后,buf

resultMap如何处理复杂映射问题

《resultMap如何处理复杂映射问题》:本文主要介绍resultMap如何处理复杂映射问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录resultMap复杂映射问题Ⅰ 多对一查询:学生——老师Ⅱ 一对多查询:老师——学生总结resultMap复杂映射问题

java实现延迟/超时/定时问题

《java实现延迟/超时/定时问题》:本文主要介绍java实现延迟/超时/定时问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Java实现延迟/超时/定时java 每间隔5秒执行一次,一共执行5次然后结束scheduleAtFixedRate 和 schedu

如何解决mmcv无法安装或安装之后报错问题

《如何解决mmcv无法安装或安装之后报错问题》:本文主要介绍如何解决mmcv无法安装或安装之后报错问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录mmcv无法安装或安装之后报错问题1.当我们运行YOwww.chinasem.cnLO时遇到2.找到下图所示这里3.

浅谈配置MMCV环境,解决报错,版本不匹配问题

《浅谈配置MMCV环境,解决报错,版本不匹配问题》:本文主要介绍浅谈配置MMCV环境,解决报错,版本不匹配问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录配置MMCV环境,解决报错,版本不匹配错误示例正确示例总结配置MMCV环境,解决报错,版本不匹配在col

Vue3使用router,params传参为空问题

《Vue3使用router,params传参为空问题》:本文主要介绍Vue3使用router,params传参为空问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录vue3使用China编程router,params传参为空1.使用query方式传参2.使用 Histo

SpringBoot首笔交易慢问题排查与优化方案

《SpringBoot首笔交易慢问题排查与优化方案》在我们的微服务项目中,遇到这样的问题:应用启动后,第一笔交易响应耗时高达4、5秒,而后续请求均能在毫秒级完成,这不仅触发监控告警,也极大影响了用户体... 目录问题背景排查步骤1. 日志分析2. 性能工具定位优化方案:提前预热各种资源1. Flowable

springboot循环依赖问题案例代码及解决办法

《springboot循环依赖问题案例代码及解决办法》在SpringBoot中,如果两个或多个Bean之间存在循环依赖(即BeanA依赖BeanB,而BeanB又依赖BeanA),会导致Spring的... 目录1. 什么是循环依赖?2. 循环依赖的场景案例3. 解决循环依赖的常见方法方法 1:使用 @La