有两个关键的交调加密函数? [英] Is there two key symetric commutative encryption function?

查看:144
本文介绍了有两个关键的交调加密函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一些强大的(如AES等)加密函数,工作原理如下:

I'm wondering if there is some strong (like AES or so.) encryption function that works like this:


  • symetric

  • 2键:plaintext - > 2keys - >加密文本,但不必考虑键的顺序,例如

Key1(Key2(plaintext))== Key2(Key1(plaintext))
eg commutative
(解密时也需要 - 您需要两个键,无关紧要)

Key1 (Key2 (plaintext)) == Key2 (Key1(plaintext)) e.g. "commutative" (also required for decryption - you need two keys, doesn't matter order)

感谢

推荐答案

这不是一个交换加密,但有很多成熟的秘密共享算法(注意,这不是协议。)

It's not a commutative encryption, but there are well-proven algorithms for secret sharing (note, this is not the same thing as "key agreement.")

两个最着名的方法是Shamir和Blakley。一般来说,这些算法采取秘密并产生许多份额。当足够的份额可用于达到阈值时,可以恢复秘密。在最简单的情况下,需要两个份额,但是阈值可以更高。

Two of the best known methods are Shamir's and Blakley's. In general, these algorithms take a secret and produce many "shares". When enough shares are available to reach a threshold, the secret can be recovered. In the simplest case, two shares are required, but the threshold can be higher.

为了简单地解释Shamir的方法,考虑图上的一条线。如果你知道线上的任何两点,你知道关于线的一切。任何字节字符串,如对称密码的加密密钥,只是一个大数字,在base-256。 Shamir的算法将此秘密视为线的y截距(当x = 0时的线的y坐标)。然后随机选择线的斜率。在x = 1,x = 2,x = 3,&hellip的线的y坐标;并且每个点被给予不同的股东。

To explain Shamir's method in simple terms, think about a line on a graph. If you know any two points on the line, you know everything about the line. Any string of bytes, like the encryption key of a symmetric cipher, is just a large number, in base-256. Shamir's algorithm treats this secret as the line's "y-intercept" (the y-coordinate of the line when x=0). Then the line's slope chosen randomly. The y-coordinates of the line at x=1, x=2, x=3, … are computed, and each point is given to a different share-holder.

如果这些共享者中的任何两个共同聚集在一起,他们可以通过他们的两个点,回到y轴画一条线。它穿过轴的y坐标是原始秘密。然而,每个股东只有一个点;它们自己不能猜测关于原始秘密的任何东西。

If any two of these share-holders get together, they can draw a line through their two points, back to the y-axis. The y-coordinate at where it crosses the axis is the original secret. However, each share-holder has only one point; by themselves, they can't guess anything about the original secret.

阈值可以通过增加多项式的程度来增加。例如,如果使用抛物线而不是线,则需要三个份额而不是两个份额。

The threshold can be increased by increasing the degree of the polynomial. For example, if a parabola is used instead of a line, three shares are needed instead of two.

还有一个真正的实现,比如使用模运算,但这是其背后的概念。 Blakley的方法是类似的,但它使用平面的交集编码的秘密。

There's more to a real implementation, like the use of modular arithmetic, but this is the concept behind it. Blakley's approach is similar, but it uses the intersection of planes to encode the secret.

你可以玩一个实现 Shamir的在线方法。

这篇关于有两个关键的交调加密函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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