RSA算法 :首先, 找出三個數, p, q, r, 其中 p, q 是兩個相異的質數, r 是與 (p-1)(q-1) 互質的數...... p, q, r 這三個數便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 這個 m 一定存在, 因為 r 與 (p-1)(q-1) 互質, 用輾轉相除法就可以得到了..... 再來, 計算 n = pq....... m, n 這兩個數便是 public_key ,編碼過程是, 若資料為 a, 將其看成是一個大整數, 假設 a < n.... 如果 a >= n 的話, 就將 a 表成 s 進位 (s
標簽:
person_key
RSA
算法
上傳時間:
2013-12-14
上傳用戶:zhuyibin
BNB20 Finds the constrained minimum of a function of several possibly integer variables.
% Usage: [errmsg,Z,X,t,c,fail] =
% BNB20(fun,x0,xstatus,xlb,xub,A,B,Aeq,Beq,nonlcon,settings,options,P1,P2,...)
%
% BNB solves problems of the form:
% Minimize F(x) subject to: xlb <= x0 <=xub
% A*x <= B Aeq*x=Beq
% C(x)<=0 Ceq(x)=0
% x(i) is continuous for xstatus(i)=0
% x(i) integer for xstatus(i)= 1
% x(i) fixed for xstatus(i)=2
%
標簽:
constrained
variables
function
possibly
上傳時間:
2014-01-13
上傳用戶:youth25