PDF signatures

The PDF format supports two types of user signatures: Certification signatures in addition to signing the document also select which changes to the document shall be allowed after signing; approval signatures merely sign. Usually the author of a document signs it using a certification signature to indicate that he is Read more…

数字签名,数字证书,加密

加密、数字签名和数字证书

1. 什么是加密 加密就是对明文数据按某种特殊算法进行处理,使其成为不可读的一段代码,通常称为“密文“, 密文通过”密钥“解密后还原出原来的明文,通过这样的途径可以达到保护数据不被非法人窃取、阅读的目的。 定义简单吧?那来看个题,考虑以下哪些属于加密方法: 这几种都是日常开发中常用的数据编码技术,但是只有 AES、RSA、SM4 才能算是加密方法。 为什么呢?一个区分的简单方法就是看编码后的数据是否还能还原,能还原的是加密。 MD5 实际上是对数据进行有损压缩,无论数据有多长,1KB、1Mb 还是 1G,都会生成固定 128 位的散列值,并且 MD5 理论上是不可能对编码后的数据进行还原的,即不可逆。 MD5 因为其具有不可逆性、单向恒定性(相同的数据多次计算值不变)被广泛应用于文件完整性验证、口令加密以及接下来会讲到的数字签名中。 至于 BASE64 是否算做加密方法,仁者见仁。在这里不下结论,因为 BASE64 编码不需要密钥,且编码后的字符串任何人都可以解码出原串,所以一般不认为是加密方法。BASE64 常用来做转码,把二进制字节序列转化为 ASCII 字符序列。 2. 加密算法的分类 加密算法按照加解密使用的密钥是否相同,可分为: 1. 对称加密 对称加密是指加密和解密时使用同一个密钥。 2. 非对称加密 非对称加密是指加密和解密使用不同的密钥,这两个密钥分别叫做「公钥」、「私钥」。 公钥是可以公开给所有人的,而私钥需要自己保密的。 公钥加密的数据只能用私钥解密: 同理,私钥“加密”的数据只能用公钥“解密”: 大家注意到没,我对 私钥“加密” 这里打了引号,为什么呢? 因为私钥不是用来加密的,准确的说法应该是 「私钥签名,公钥验签」。 这个问题很多同学都存在误解,认为公私钥都可以用于加密。 实际上不是的,至于为什么,后面讲完签名我会解释的。 3. 故事开始 为了讲这个故事,小北请来了密码学中常用的学术情侣,Alice 和 Bob,以及窃听者代表 Eve。 我们从 Alice、Bob Read more…

OpenAI information

Models Overview The OpenAI API is powered by a diverse set of models with different capabilities and price points. You can also make limited customizations to our original base models for your specific use case with fine-tuning. MODELS DESCRIPTION GPT-4 Limited beta A set of models that improve on GPT-3.5 and can Read more…

What Is Apple One?

Apple One is a subscription service that bundles together Apple’s various digital services, such as Apple Music, Apple TV+, Apple Arcade, iCloud storage, and more. It’s designed to give users access to all of Apple’s services in one convenient package. Apple One was announced at Apple’s September 2020 event and Read more…

Google Colab

What is Colaboratory? Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education. More technically, Colab is a hosted Jupyter notebook service that requires Read more…

Comparing RIFE And MEMC Frame-Filling Techniques

When it comes to video production, frame-filling techniques are essential for creating smooth and seamless visuals. Two of the most popular methods for achieving this effect are RIFE (Redundant Image Frame Elimination) and MEMC (Motion Estimation Motion Compensation). Both techniques have their own advantages and disadvantages, so it’s important to Read more…