Tink:用于GCP、安卓和iOS的谷歌加密软件库
source link: http://www.infoq.com/cn/news/2018/09/google-tink-cryto-ios-android?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Tink 是由一些谷歌加密工程师和安全工程师开发的一种多语言的、跨平台的加密软件库,意在帮助开发人员无需成为加密专家就可以正确地实现加密。经过最近两年的开发, 1.2版本中添加了对GCP、安卓和iOS平台以及C++和Objective-C的支持 。
Tink源自于另一个 谷歌的项目 。该项目意在加固加密软件库应对偏斜随机数(biased nonces)、无效曲线(invalid curves)等已知攻击,并确保DSA、RSA、AES-EAX等广为使用的加密算法给出正常的行为。基于该项目的经验,谷歌工程师着手创建了这个新的软件库,目标是提供易于正确使用并难以误用的安全API。例如,为防止出现可导致加密算法安全性降低的随机数重用问题,Tink不允许用户传递随机数。同时,Tink努力使其提供的每个API都有尽可能明确的安全保证。例如,如果一个特定的操作对 选择密文攻击(chosen-ciphertext attack) 是安全的,那么该保证会显示在接口上,并且实现该操作所用的每个原语都必须满足同一保证。
Tink当前提供四种 加密操作 。每种操作都是由特定的原语实现的:
- 对相关联数据经认证的加密。(原语:AEAD)。
- 消息认证代码(原语:MAC)。
- 数字签名(原语:PublicKeySign和PublicKeyVerify)
- 混合加密(原语:HybridEncrypt和HybridDecrypt)。
每个操作都有一组关联的最小属性,并具有一个保证。一个原语可以有多种实现,用户通过实例化 相应类型的密钥 选择具体使用的实现。例如,下面的代码使用 AEAD原语 实现AES-EAX加密文本:
import com.google.crypto.tink.Aead; import com.google.crypto.tink.KeysetHandle; import com.google.crypto.tink.aead.AeadFactory; import com.google.crypto.tink.aead.AeadKeyTemplates; // 1. 生成密钥。 KeysetHandle keysetHandle = KeysetHandle.generateNew( AeadKeyTemplates.AES256_EAX); // 2. 获取原语。 Aead aead = AeadFactory.getPrimitive(keysetHandle); // 3. 使用原语。 byte[] plaintext = ...; byte[] additionalData = ...; byte[] ciphertext = aead.encrypt(plaintext, additionalData);
除了加密操作,Tink还提供对密码管理的支持,包括密钥版本管理、密钥旋转,以及支持远程密钥管理系统(KMS,key management system)。当前,Tink支持下列KMS:
- Google Cloud KMS。
- Amazon KMS。
- Android Keystore。
- Apple iOS KeyChain(计划中)。
Tink当前支持Java、C++和Objective-C。 意向于2018年12月发布的1.3版本 将提供对C#、Go和JavaScript/Node的支持。
尽管Tink并非受谷歌官方支持的产品,但是它已经用于一些谷歌产品,其中包括AdMob、Google Pay、Google Assistant、Firebase和Search API等。
查看英文原文: Tink is Google Cryptographic Library for the Cloud, Android, and iOS
Recommend
-
93
solidot新版网站常见问题,请点击这里查看。 提交文章 ...
-
42
-
41
很多软件项目需要处理外部生成的数据,因此不能被完全信任。 例如,将用户提供的图片文件转换为不同的格式,或者是执行由用户生成的软件代码等。
-
5
Open banking platfrom Tink r...
-
6
BNP Paribas and Tink join forces to launch new multi-banking tool Banca Nazionale del Lavoro (BNL), the Italian banking arm of BN...
-
2
Tink acquires German fintech FinTecSystems Tink has bought German open banking infrastructure fintech FinTecSystems as it looks to solidify its position as a leader in the open banking space....
-
6
Visa To Acquire European Open Banking Platform Tink Visa today announced it has signed a definitive agreement to acquire Tink, a European open banking platform that enables financial institu...
-
3
TechVisa to buy Swedish fintech Tink for $2.1 billion after abandoning Plaid takeoverPublished Thu, Jun 24 20213:13 AM EDTUpdated Thu, Jun 24 202110...
-
5
Open banking platform Tink has signed a strategic partnership for open banking technology with Revolut, a popular neobank. Tink’s payment initiation services (PIS) technology is expected to allow Revolut users across Europe to easily mov...
-
2
存储和操作n维数据的难题,谷歌用一个开源软件库解决了 作者:新智元 2022-09-23 15:50:06 TensorStore 是专为存储和操作 n 维数据而设计的开源软件库。 计...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK