01: package org.bouncycastle.crypto.params;
02:
03: import java.math.BigInteger;
04: import java.util.Vector;
05:
06: /**
07: * Private key parameters for NaccacheStern cipher. For details on this cipher,
08: * please see
09: *
10: * http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
11: */
12: public class NaccacheSternPrivateKeyParameters extends
13: NaccacheSternKeyParameters {
14: private BigInteger phi_n;
15: private Vector smallPrimes;
16:
17: /**
18: * Constructs a NaccacheSternPrivateKey
19: *
20: * @param g
21: * the public enryption parameter g
22: * @param n
23: * the public modulus n = p*q
24: * @param lowerSigmaBound
25: * the public lower sigma bound up to which data can be encrypted
26: * @param smallPrimes
27: * the small primes, of which sigma is constructed in the right
28: * order
29: * @param phi_n
30: * the private modulus phi(n) = (p-1)(q-1)
31: */
32: public NaccacheSternPrivateKeyParameters(BigInteger g,
33: BigInteger n, int lowerSigmaBound, Vector smallPrimes,
34: BigInteger phi_n) {
35: super (true, g, n, lowerSigmaBound);
36: this .smallPrimes = smallPrimes;
37: this .phi_n = phi_n;
38: }
39:
40: public BigInteger getPhi_n() {
41: return phi_n;
42: }
43:
44: public Vector getSmallPrimes() {
45: return smallPrimes;
46: }
47: }
|