菜鸟教程小白 发表于 2022-12-13 11:57:30

iphone - 数字身份等于公钥+私钥?


                                            <p><p>我正在阅读有关 iOS 中的应用程序代码签名的信息,但我不明白为什么私钥和公钥都在一起?使用私钥对应用程序进行签名时,公钥和证书是做什么用的?</p>

<p> <img src="/image/h5WM9.jpg" alt="enter image description here"/> </p>

<blockquote>
<p>Xcode uses your digital identity to sign your application during the
build process. This digital identity consists of a public-private key
pair and a certificate. The private key is used by cryptographic
functions to generate the signature. The certificate is issued by
Apple; it contains the public key and identifies you as the owner of
the key pair.</p>
</blockquote></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p><strong>我们总结一下流程:</strong></p>

<p><strong>您使用您的私钥加密</strong>应用程序可执行文件的<em>散列摘要</em>(如 md5 或 sha-1)。那是“<strong>签名</strong>”。</p>

<p><strong>您的用户使用您的公钥解密</strong>它(他们拥有它是因为它是公开的)并对照可执行文件检查它。只要您的私钥保持私密,就是您“签署”了它。这就是所谓的“<strong>验证</strong>”。</p>

<p><strong>那么数字身份呢:</strong></p>

<p>您的公钥本身不是公开的,它必须<strong>以某种方式共享</strong>、“公开”,并由认证机构(特此为 CA)签署,(即 CA 对其进行加密 -或者它的哈希值——使用他们的一个,<em>神奇的神秘私钥</em>)这保证了共享过程没有被中间人篡改。 </p>

<p>因此,公钥和证书(CA 签名 - CA 加密您的公钥)<em>识别您</em>(因此被视为您的“数字身份”的一部分)并且必须以某种方式到达最终用户(通过第三方,嵌入到可执行文件中,你来命名)</p></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - 数字身份等于公钥&#43;私钥?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/9539019/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/9539019/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - 数字身份等于公钥&#43;私钥?