生成一段时间后自动过期的SJCL的密钥? [英] generate a key for SJCL that expires automatically after a period of time?

查看:250
本文介绍了生成一段时间后自动过期的SJCL的密钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想加密和解密客户端的数据,因为我正在使用SJCL库,但是我希望我的密钥在预定的时间后过期,所以我的问题是 -

I want to encrypt and decrypt the data on client-side for that i am using SJCL library, but i want my key to be expired after a scheduled time , so my question here is -


  1. 可以在使用SJCL(或任何其他库可能)时生成这样的密钥,

  1. is it possible to generate such a key while using SJCL(or any other library may be) ,

如果是,如何?只要客户端的密钥只能在没有任何服务器交互的情况下被拆除?

if yes how? provided that the key must be demolished on the client side only without any server interaction?

任何帮助都非常感谢。谢谢

any help is greatly appreciated. thanks

推荐答案

不,第三方的帮助(保持密钥)或正常的编程技术(即使用定时器)没有键具有这样的内在时间。

No, outside help of a third party (keeping the key) or normal programming techniques (i.e. wiping the key using a timer) there is no key that has such an intrinsic time out.

证书具有有效期。使用这样的证书,可以签署消息,将证书添加到签名的消息。然后,您只接受证书尚未过期的消息。换句话说,密钥本身仍然可用,但它已经变得无用。

Certificates have a validity period though. With such a certificate it is possible to sign messages, adding the certificate to the signed message. You then only accept those messages whose certificate has not expired. In other words, the key itself will still be available, but it has become useless.

为此,可以使用PGP或CMS容器格式​​,可以存储证书以及数据和签名。数据也可以加密。

For this use either the PGP or CMS container formats, which are able to store the certificates as well as the data and the signature. The data may be encrypted as well.

这篇关于生成一段时间后自动过期的SJCL的密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆