C# 클래스 MpcLib.MpcProtocols.Crypto.DiscreteLogCrypto

A fast implementation of the discrete logarithm cryptosystem. Let p be a prime and x be the plaintext. The cipher c is defined as c = g^x mod p, where g is a generator modulo p. Fast modular exponentiation is performed by caching g^(2^i) in an array of size log(p), where 0 <= i <= logp . The exponentiation is simply done by multiplying the elements of the array that correspond to the ones in the binary representation of x.
파일 보기 프로젝트 열기: mahdiz/mpclib

공개 메소드들

메소드 설명
DiscreteLogCrypto ( int g, System.Numerics.BigInteger p ) : System
Encrypt ( System.Numerics.BigInteger x ) : System.Numerics.BigInteger

메소드 상세

DiscreteLogCrypto() 공개 메소드

public DiscreteLogCrypto ( int g, System.Numerics.BigInteger p ) : System
g int
p System.Numerics.BigInteger
리턴 System

Encrypt() 공개 메소드

public Encrypt ( System.Numerics.BigInteger x ) : System.Numerics.BigInteger
x System.Numerics.BigInteger
리턴 System.Numerics.BigInteger