惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
N
News and Events Feed by Topic
C
Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
A
Arctic Wolf
Scott Helme
Scott Helme
P
Palo Alto Networks Blog
S
Schneier on Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Tor Project blog
量子位
G
Google Developers Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog RSS Feed
NISL@THU
NISL@THU
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
AWS News Blog
AWS News Blog
爱范儿
爱范儿
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
L
LINUX DO - 最新话题
Security Archives - TechRepublic
Security Archives - TechRepublic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
Cloudbric
Cloudbric
aimingoo的专栏
aimingoo的专栏
L
Lohrmann on Cybersecurity
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News: Ask HN
Hacker News: Ask HN
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
S
Security @ Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
G
GRAHAM CLULEY
P
Proofpoint News Feed
V
V2EX
Martin Fowler
Martin Fowler
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Cloudflare Blog
SecWiki News
SecWiki News
罗磊的独立博客
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
The Last Watchdog
The Last Watchdog

博客园 - xcywt

IT人备考心得分享 一个大龄程序员的回乡记 一种刚接触的语法。只在linux可用 malloc底层实现以及和new的比较 C++异步调用 future async promise packaged_task 如果在单例模式中返回share_ptr ??? 记录一道面试题(哈希表 稀疏矩阵) Qt实现自定义控件-按钮 一个线程池的例子 C++ 条件变量condition_variable的例子 C++中share_ptr中循环引用的问题 C++14的一些新特性 C++11的一些特性 ubuntu编译grpc & protobuf perf笔记 一个cmakelist的例子(自动处理多个proto) Linux下eCal测试计划及进度记录 windows编译ecal 记录一次重装gitlab
固件打包流程
xcywt · 2025-03-20 · via 博客园 - xcywt

基础知识:

SHA-256

  • 类型: 哈希函数
  • 用途: 用于生成数据的唯一指纹(哈希值),确保数据的完整性。
  • 特性: 不可逆、快速计算、抗碰撞性。

RSA

  • 类型: 非对称加密算法
  • 用途: 主要用于加密数据、数字签名和密钥交换。
  • 特性: 使用一对密钥(公钥和私钥),其中公钥用于加密或验证签名,私钥用于解密或生成签名。

关联与协作

尽管SHA-256和RSA有不同的用途,但它们可以在多个方面相互配合:

  1. 数字签名:

    • 在创建数字签名时,通常首先使用SHA-256对消息进行哈希处理,然后使用发送者的RSA私钥对该哈希值进行加密,生成数字签名。接收方可以使用相同的SHA-256算法对接收到的消息进行哈希,并使用发送者的RSA公钥解密数字签名来验证该哈希是否匹配。这不仅验证了消息的完整性,还确认了消息确实来自拥有相应私钥的发送者。

 

打包流程:

未加密的tar包  -》(AES加密) -》 对固件求SHA256 -》对SHA256通过RSA私钥加密 -》填充到256字节 -》写入固件开头 -》输出加密后的包

(也可以不经过AES加密)

解包流程:

 加密后的包 -》读取前256字节-》通过RSA公钥解密 -》求出SHA256 -》验证包的完整性 -》(AES解密) -》解密后的包