CN100589375C - Mapping method for identification and key - Google Patents

Mapping method for identification and key Download PDF

Info

Publication number
CN100589375C
CN100589375C CN 200610115440 CN200610115440A CN100589375C CN 100589375 C CN100589375 C CN 100589375C CN 200610115440 CN200610115440 CN 200610115440 CN 200610115440 A CN200610115440 A CN 200610115440A CN 100589375 C CN100589375 C CN 100589375C
Authority
CN
China
Prior art keywords
step
key
id
key factor
factor matrix
Prior art date
Application number
CN 200610115440
Other languages
Chinese (zh)
Other versions
CN1909445A (en
Inventor
李春强
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN 200610115440 priority Critical patent/CN100589375C/en
Publication of CN1909445A publication Critical patent/CN1909445A/en
Application granted granted Critical
Publication of CN100589375C publication Critical patent/CN100589375C/en

Links

Abstract

The invention relates to a projection method between mark and key, wherein said method can be used in the combined key manage system based on mark; said system has generated key factor matrix; said method comprises: based on the length value of constant binary mark or the constant binary mark transformed from variable binary mark, checking the size of key factor matrix; based on the constant binary mark, calculating out the row mark group and queen mark group of key factor in the key factor matrix to position the key factor; using said key factor to calculate the key relative to the constant binary mark. The invention simplifies the projection method from mark to key, to be used on IPv4 and IPv6, to realize non-conflict projection.

Description

一种标识和密钥的映射方法 A method for identifying and mapping the key

技术领域 FIELD

本发明涉及组合密钥管理技术领域,尤其涉及基于标识的组合密钥管理:技术领域,具体来讲是一种标识和密钥的映射方法。 The present invention relates to a combination of key management technology field, and particularly to compositions based on the identification of key management: technical field, particularly in terms of a mapping method for identifying and keys.

背景技术 Background technique

现代密码学的安全是建立在密钥保密而不是算法保密的基础上的,因此密钥的管理保护成了信息保密的关键。 Security of modern cryptography is based on key privacy and confidentiality based not on algorithms, so the key management to protect the confidentiality of information has become critical. 密钥和密钥拥有者标识之间的绑定是现代网络安全研究的最重要内容之一。 Binding between the identification keys and key owner is one of the most important part of modern security research networks. 目前将密钥和密钥拥有者标识绑定有 Currently the owner of the keys and key bindings have identity

两种方式, 一种是通过密钥来生成密钥拥有者的标识,CGA (Cryptographical ly Generated Address)是这种方式的典型^R表;另——种方式是通过标识来确定出该标识对应的密钥,即基于标识的密码体制。 In two ways, one is the identification key is generated by the key owner, CGA (Cryptographical ly Generated Address) that is a typical embodiment of the ^ R tables; the other - the ways is determined by the identifier corresponding to the identifier the key cryptosystem that is based on identity. 1984 年,Shamir提出了基于标识的签名设想,2G01年Don Boneh和Matthew Frankl in 根据Shamir的设想,提出了以Weil配对方式实现的基于标识的密钥管理体制。 In 1984, Shamir proposed a vision based on the identity of the signature, 2G01年 Don Boneh and Matthew Frankl in envisaged Shamir proposed a key management system based on the identity of the Weil pairing to achieve. 组合公钥(CPK)密码体制也是一种基于标识的密钥管理体制,它可以根据通信对方的标识直接计算出对方的公钥,在CPK体制中实现标识到密钥的映射是一个关键问题。 Combined public key (CPK) cryptography key management system is based on the identification, which may be calculated according to the communication partner's public key identifies each other directly, achieve CPK system to identify the key mapping is a key issue. 在一般的公钥体制中,各用户的公钥是直接公布的,有多少用户,就^^布多少个^^钥,而在组合/>钥技术中,各用户的公钥不直接^^布, 而只公布公钥因子矩阵,各用户的公钥则通过公钥因子矩阵和相关标识计算出来。 In a typical public key system, each user's public key is published directly, how many users, how many ^ ^ ^ ^ key on cloth, but in combination /> key technology, each user's public key is not directly ^^ cloth, but only publishes the public key factor matrix, each user's public key is calculated by the correlation identifier and the public key factor matrix.

在基于标识的组合密钥管理体制中,文献([l]南湘浩,陈钟;网络安全技术概论;北京,国防工业出版社,2003. 7; [2]唐文,南相浩,陈钟;基于椭圓曲线密钥系统的组合公钥技术;计算机工程与应用,2003年21期)给出的由标识到密钥的映射算法如下所述:首先是计算行标: In Identity-based key management system portfolio in the literature ([l] Nanxiang Hao, Chen Zhong; Introduction to network security technology;. Beijing, National Defense Industry Press, 20037; [2] Tang, Nam Sang-ho, Chen Zhong; combination of public key technology key based on elliptic curve system; computer Engineering and applications, 2003, 21) given by the identification of the key mapping algorithm as follows: first, calculate the standard line:

给定行密钥RowKey,它是系统中一个公开的常量。 Given row key RowKey, it is disclosed a system constant. 首先通过一种HASH函数(比如MD5、 SHA-l等),将不定长度的标识ID变换成一个固定长度的变量Datal。 First, by means of a HASH function (such as MD5, SHA-l, etc.), the ID of indefinite length identifier into a fixed length variable Datal. 即,HASH(ID)=Datal; I.e., HASH (ID) = Datal;

然后,通过加密算法(如AES)将中间变量Datal作为数据,用行密钥RowKey 加密后得到MAP。 Then, the encryption algorithm (e.g., AES) as the intermediate variable data Datal, with the row key encrypted with RowKey MAP. ;将MAP。 ; The MAP. 作为数据,再用密钥RowKey加密得出MAP,;类似的直到得出所需的MAP值为止。 As the data, and then encrypting key derived RowKey ,; MAP MAP obtain similar until the desired value is reached. 为了便于i兌明,设密钥因子矩阵的大小为32 x 32。 To facilitate out against i, provided a key factor matrix size of 32 x 32. then

AESR。 AESR. rfey (Datal)-MAP。 rfey (Datal) -MAP. ;

AES RowKey AES RowKey

(MAPO)=MAP1; (MAPO) = MAP1;

接着,MAP。 Then, MAP. 的16个字节分别用M(本例中M-32)模,得出16个小于M的行标,以MAP[O]〜MAP[15]表示,MAP,的16个字节分别模M后得出16个小于M的行标,以MAP[16]〜MAP[31]表示; 16 bytes with M (in this case M-32) are molded, to obtain 16 row index M small to MAP [O] ~MAP [15] indicates, MAP, 16 bytes are modulo M after obtaining the 16 small in M ​​row index to MAP [16] ~MAP [31] represented;

MAP。 MAP. [i] modM = MAP[i] (i=0, 1…,15); [I] modM = MAP [i] (i = 0, 1 ..., 15);

MAPji〗modM = MAP[i] (i=16, 17... , 31); MAPji〗 modM = MAP [i] (i = 16, 17 ..., 31);

至此得出了32个行标,用于行的32次选择。 So far drawn a line marked 32, 32 of the selected row.

在行标计算后,进行列标的计算: After the calculation of the line mark, be the subject of a column calculation:

为了避免列标的顺序取用,设置列变量的置换算法PMT,其结果是(0, 1, 2, ..., 31)的全排列的一种,计算方法如下所示。 In order to avoid the subject sequentially access column, the column is provided PMT variable replacement algorithm, the result is (0, 1, 2, ..., 31) a full array, calculated as follows. 首先计算PMT算法所用的密钥PMT—KEY; AESc。 First calculate the key algorithm used PMT PMT-KEY; AESc. 1Key(ID)=PMT_KEY, ColKey是系统中一个公开的常量。 1Key (ID) = PMT_KEY, ColKey disclosed is a system constant.

用PMTpmti(原序)-PE腹UT;原序是O, 1,......31的自然序。 With PMTpmti (original order) -PE abdominal the UT; the original order is O, 1, ...... 31 natural order. PERMUT是新 PERMUT new

的置换。 Replacement.

上述的方法是针对各种类型的标识做出的一种通用的映射方法,该方法计算量大,计算复杂,而且可能存在映射冲突问题。 The above-described method is a generic method of mapping for various types of identification made by the method computationally intensive, complicated calculation, and there is a mapping may be conflict. 现有方案中,没有针对象IPv4、 IPv6地址这类具有一定特殊性的标识给出一个特定的映射算法,而在实际的场景中,这一类的标识有着非常广泛的应用。 Existing solutions, did not give a specific mapping algorithm for identification as IPv4, IPv6 addresses of this type having a certain degree of particularity, in the actual scenario, this type of identification has a very wide range of applications.

10发明内容 10 SUMMARY OF THE INVENTION

鉴于现有技术中的上述问题,本发明提供了一种标识和密钥的映射方法, 简化了标识到密钥的映射计算,映射方法简洁高效,而且对于具有特殊性的标识可以实现标识到密钥的无冲突映射。 In view of the above-described problems of the prior art, the present invention provides a method of identifying and mapping the key, simplifies the calculation of the identification key mapping, the mapping method is simple and efficient, but also for the identification can be achieved with specificity to identify adhesion key conflict-free maps.

本发明提供了一种标识和密钥的映射方法应用于基于标识的组合密钥管 The present invention provides a method for identifying and mapping is applied based on the identification key combination key tube

理系统中,在所述系统中已经生成密钥因子矩阵,所述方法包括步骤:步骤l, 根据定长二进制标识或由非定长二进制标识转换的定长二进制标识的长度值检验密钥因子矩阵的大小,所迷密钥因子矩阵的大小表示为Mx 2n;其中,包括:对定长二进制标识的长度值进行因子分解按照公式进行,该公式的表达式为:S=Mxr+k;其中,S:定长二进制标识的长度值;M:密钥因子矩阵的行数;2n:密钥因子矩阵的列数;k > 0且k〈M; S、 M、 k、 r、 n均为整数;根据因子分解的结果判断密钥因子矩阵的大小是否合适;若判断结果为合适,则执行步骤2;步骤2,根据所述定长二进制标识计算出密钥因子在密钥因子矩阵中相应的行标组和列标组;其中,包括:计算与所述定长二进制标识相应的列标组;对密钥因子矩阵的所有行标进行置换,得到与所述定长二进制标识相应的行标组 Management system, the system has generated a key factor matrix, said method comprising the steps of: a step L, verification key factor values ​​according to a length or fixed-length binary identification converted fixed-length binary identification of a non-fixed-length binary identification size of the matrix, the size of the key factor matrix is ​​expressed as fans Mx 2n; wherein, comprising: a length value of the fixed-length binary identification factoring in accordance with the formula, the formula is the expression: S = Mxr + k; wherein , S: the length of the fixed-length binary value identification; M: the number of rows key factor matrix; 2n: number of columns in the key factor matrix; k> 0 and k <M; S, M, k, r, n are integer; determining the key factor matrix according to a result of the appropriate size for the factorization; if the judging result is appropriate, then the step 2; step 2, calculates a key factor in the corresponding key factor matrix according to the fixed length binary identification row and column standard beacon group; wherein, comprising: calculating long binary column header identifying the respective set of said set; all lines marked on the key factor matrix replaced, to obtain the corresponding fixed length binary identification line standard group 步骤3,利用所述行标组和列标组对应的密钥因子计算与所述定长二进制标识对应的密钥。 Step 3, using the row key and column scale factor calculation standard corresponding to the group identifier and the long binary key corresponding to the predetermined. 所述步骤l还包括:若判断结果为不合适,则重新生成密钥因子矩阵。 L further comprising the step of: if the judging result to be inappropriate, the rekeying factor matrix.

判断密钥因子矩阵的大小是否合适是指:判断r是否大于n;若判断结果为r《n〈S,则该密钥因子矩阵的大小合适;若判断结果为r〉n,则所述密钥因子矩阵的大小不合适;其中,S:定长二进制标识的长度值;n、 r均为整数。 Determining whether the size of the key factor matrix suitable means: determining whether greater than n-r; if the judgment result is r "n <S, then the size of the key factor matrix suitable; if the judging result r> n, then the secret key factor matrix is ​​the right size; wherein, S: value of the long fixed length binary identification; n, r are integers. 所述计算与定长二进制标识相应的列标组,包括:判断k〈nr是否成立; 如果判断结果为是,则按照公式计算列标组Ci(ID),该公式的表达式为: Ci(ID) = [ID》(ix,r)]&(2n-l) , i-0…M-1;其中,〉〉表示循环移位运算,ID The calculation corresponding to the fixed-length binary identification mark column group, comprising: determining k <nr are satisfied; if the determination result is yes, the column index is calculated according to the equation group Ci (ID), the expression of the equation is: Ci of ( ID) = [ID "(ix, r)] & (2n-l), i-0 ... M-1; wherein the cyclic shift operation >>, ID

为所述定长二进制标识; Said fixed length binary identification;

如果判断结果为否,则按照公式计算列标组Ci(ID),该公式表达式为: If the determination result is NO, the column index is calculated according to the equation group Ci (ID), the formula is expressed as:

iiC"ID) = [ID》(ixr)]&(2n-1) , i:0…M-[k-(nr)]-1,和CJID) = (ID》[ix (r+l)]}&(2n-1) , i:M-[k-(nr)]…M-1; 其中,》表示循环移位运算,ID为所述定长二进制标识;M、 k、 n、 r、 i为整数。 iiC "ID) = [ID" (ixr)] & (2n-1), i: 0 ... M- [k- (nr)] - 1, and CJID) = (ID "[ix (r + l)] } & (2n-1), i: M- [k- (nr)] ... M-1; where "denotes a cyclic shift operation, the ID of the fixed length binary identification; M, k, n, r, i is an integer.

所述计算与定长二进制标i^目应的列标组,包括:按照公式计算列标组Ci (ID), 该公式表达式为:Ci(ID) = (ID》[ix (r+l川&(2M) , i=0...M-1;其中,〉〉 表示循环移位运算;ID为定长二进制标识;n、 r、 i为整数。 Calculating said fixed length binary scale i ^ entry should column labeled group, comprising: a column index calculated according to Formula group Ci (ID), the formula expressed as: Ci (ID) = (ID "[ix (r + l River & (2M), i = 0 ... M-1; where >> represents the cyclic shift operation; binary identification ID is a fixed length; n, r, i is an integer.

所述计算与定长二进制标识相应的列标組,包括:按照公式计算列标组Ci(ID), 该公式表达式为:Ci(工D) = [ID》(ixr,)]& (2n-1) , i=0...Ml; The calculation corresponding to the fixed-length binary identification mark column group, comprising: a column index calculated according to Formula group Ci (ID), the formula expressed as: Ci of (work D) = [ID "(ixr,)] & (2n -1), i = 0 ... Ml;

其中,》表示循环移位运算,S〉r,〉r, r,不是S的因子,ID为定长二进制标识;S为定长二进制标识的长度值;r、 r,、 n、 i为整数。 Wherein "denotes a cyclic shift operator, S> r,> r, r, S is not a factor, as fixed-length binary identification ID; S is a fixed-length binary identification of the length value; r, r ,, n, i is an integer .

所述对密钥因子矩阵的所有行标进行置换,包括:直接选取数据序列作为行标组,该数据序列为:0, 1, ......, Ml,其中,M为密钥因子矩阵的行数。 All line marked on the key factor matrix replacement, comprising: selecting a data sequence as a direct line beacon group, the data sequence is: 0, 1, ......, Ml, wherein, M being a key factor the number of rows of the matrix.

所述对密钥因子矩阵的所有行标进行置换,包括:将数据序列顺序存放、 逆序存放或以随机的顺序存放在数组R[i]中.,该数据序列为:0, 1, ......, Ml; All rows of the standard key factor matrix replacement, comprising: storing the data sequence order, storing or reverse random order stored in an array R [i], the data sequence is: 0, 1, .. ...., Ml;

其中1 = 0, 1,……,M-1; M为密钥因子矩阵的行数。 Wherein 1 = 0, 1, ......, M-1; M is the number of rows in the key factor matrix.

所述对密钥因子矩阵的所有行标进行置换,还包括步骤: All line marked on the key factor matrix replacement, further comprising the step of:

步骤ll,设置1 = 0; Step ll, set a = 0;

步骤12,判断ID mod (Mi) 〈Mil是否成立; Step 12, it is determined ID mod (Mi) <Mil holds;

步骤13,如果步骤12的判断结果为是,则将R[ID mod (Mi )]和R[Mil] 交换位置;如果步骤12的判断结果为否,则执行步骤14; 步骤14,设置i^i + l,判断i是否等于M-2; Step 13, if the judgment result of step 12 is YES, then R [ID mod (Mi)] and R [Mil] exchange sites; If the determination result is NO in step 12, step 14; step 14, set i ^ i + l, i is equal determines M-2;

步骤15,如果步骤14的判断结果为否,则重复步骤12至步骤15;如果步骤14 的判断结杲为是,则置换结束,且经上述步骤处理后的数组R[i]存放的是(0…M-1)的一个置换。 Step 15, if the decision result in step 14 is NO, then repeat step 12 to step 15; Analyzing junction Gao If step 14 is YES, then replace the end, and by the array R [i] after the step of processing is stored in ( 0 ... M-1) is a permutation.

所述对密钥因子矩阵的所有行标进行置换,还包括步骤:步骤21,设置i-0; All line marked on the key factor matrix replacement, further comprising the step of: step 21, set i-0;

步骤22,判断ID mod (Mi) ^0是否成立; Step 22, it is determined ID mod (Mi) ^ 0 holds;

步骤23,如果步骤22的判断结果为是,则将R[(ID mod (Mi ) )+i]和R[i] 交换位置;如果步骤22的判断结果为否,则执行步骤24; 步骤24, i殳置ii + l,判断i是否等于M-2; Step 23, if the determination result in step 22 is YES, then R [(ID mod (Mi)) + i] and R [i] exchange sites; If the determination result is NO in step 22, it executes step 24; step 24 , set i Shu ii + l, it determines whether i is equal to M-2;

步骤25,如果步骤24的判断结果为否,则重复步骤22至步骤25;如果步骤24 的判断结果为是,则置换结束,且经上述步骤处理后的数組R[i]存放的是(0… Ml)的一个置换。 Step 25, if the determination result is NO in step 24, step 22 is repeated to step 25; if the determination result in step 24 is YES, then replace the end, and by the array R [i] After the above process is stored in the step ( 0 ... Ml) of a replacement.

本发明还提供了一种标识和密钥的映射方法,应用于基于标识的组合密钥管理系统中,在所述系统中已经生成密钥因子矩阵,所述方法包括步骤:步骤1,根据定长二进制标识或由非定长二进制标识转换的定长二进制标识的长度值检验密钥因子矩阵的大小,所述密钥因子矩阵的大小表示为2、 N;其中, 包括:对定长二进制标识的长度值进行因子分解按照公式进行,该公式的表达式为:S = Nxr+k;其中,S:定长二进制标识的长度值;2m:密钥因子矩阵的行数;N:密钥因子矩阵的列数;k > 0且k〈N; S、 N、 k、 r、 ra为整数;根据因子分解的结果判断密钥因子矩阵的大小是否合适;若判断结果为合适,则执行步骤2;步骤2,根据所述定长二进制标识计算出密钥因子在密钥因子矩阵中相应的行标组和列标组;其中,包括:计算与所述定长二进制标识相应的行标组; 对密 The present invention further provides a method of identifying and mapping the key, a key management system is applied based on a combination of identification, the system key factor matrix has been generated, said method comprising the steps of: Step 1, according to a given size length value checking key factor matrix or converted by binary identification of a long fixed-length binary identification of non-fixed-length binary identification, the key factor matrix size expressed as 2, N; which comprises: fixed-length binary identification factoring the length value in accordance with a formula, the formula is the expression: S = Nxr + k; wherein, S: the length of fixed-length binary identification value; 2m: number of rows in the key factor matrix; N: key factor the number of columns of the matrix; k> 0 and k <N; S, N, k, r, ra is an integer; determining the key factor matrix according to a result of the appropriate size for the factorization; if the judging result is appropriate, then the step 2 ; step 2, according to the fixed-length binary identification calculates a key factor corresponding row and column marked in the beacon group key factor matrix; wherein, comprising: calculating the fixed length binary identification mark corresponding row group; to close 因子矩阵的所有列标进行置换,得到与所述定长二进制标识相应的列标组;步骤3,利用所述行标组和列标组对应的密钥因子计算与所述定长二进制标识对应的密钥。 All columns were replaced with scale factor matrix, to obtain the corresponding column length binary identification mark with the predetermined group; step 3, a key factor is calculated using the standard row and column corresponding to the standard set of fixed length corresponding to binary identification key.

所述步骤l还包括:若判断结杲为不合适,则重新生成密钥因子矩阵。 L step further comprises: determining if Gao junction is not appropriate, the rekeying factor matrix. 判断密钥因子矩阵的大小是否合适是指:判断r是否大于m;若判断结果为r《m〈S,则该密钥因子矩阵的大小合适;若判断结果为r〉m,则所述密钥因子矩阵的大小不合适;其中,S:定长二进制标识的长度值;m、 r为整数。 Determining whether the size of the key factor matrix suitable means: determines whether or not m is greater than r; if the judging result r "m <S, then the size of the key factor matrix suitable; if the judging result r> m, then the secret key factor matrix is ​​the right size; wherein, S: value of the long fixed length binary identification; m, r are integers. 所述计算与定长二进制标识相应的行标组,包括:判断k〈mr是否成立; Calculating said fixed length binary identification mark corresponding row group, comprising: determining k <mr is satisfied;

13若判断结果为是,则按照公式计算行标组Ci(ID),该公式的表达式为: 13 If the determination result is yes, the row index is calculated according to the equation group Ci (ID), the expression is of the formula:

Ci (ID)=[工D〉〉 (ixr) ] & (2m-1) , i:0…N-1; Ci (ID) = [workers D >> (ixr)] & (2m-1), i: 0 ... N-1;

若判断结果为否,则按照公式计算行标组Ci(ID),该公式表达式为: If the judgment result is no, the row index is calculated according to the equation group Ci (ID), the formula is expressed as:

Ci(ID) = [ID》(ixr)]&(2ra-1) , i=0〜N-[k-(mr)]一l,和 Ci (ID) = [ID "(ixr)] & (2ra-1), i = 0~N- [k- (mr)] a l, and

Ci(ID) = {ID»[ix (r+l)]}&(2m-1) , i=N-[k-(mr)]…Nl; Ci (ID) = {ID »[ix (r + l)]} & (2m-1), i = N- [k- (mr)] ... Nl;

其中,》表示循环移位运算,ID为所述的定长二进制标识;N、 k、 r、 m、 i Wherein "denotes a cyclic shift operation, the ID of the fixed-length binary identification; N, k, r, m, i

为整数。 It is an integer.

所述计算与定长二进制标i^目应的行标组,包括:按照公式计算行标组G (ID), 该公式表达式为:C"ID) = UD》[ix (r+l)]}&(2m-l),卜0…N-1;其中,》 表示循环移位运算,ID为所述的定长二进制标识;N、 r、 m、 i为整数。 Calculating said fixed length binary scale i ^ entry should mark row group, comprising: a row calculating beacon group G (ID) according to the formula, the formula expressed as: C "ID) = UD" [ix (r + l) ]} & (2m-l), Bu 0 ... N-1; where "denotes a cyclic shift operation, the ID of the fixed-length binary identification; N, r, m, i is an integer.

所述计算与定长二进制标i口^目应的行标组,包括:按照公式计算行标组Ci (ID), 该公式表达式为:Ci(ID) = [ID〉〉(ixr,)]&(2m-1) , i=O...N-1;其中,〉>表示循环移但运算,S〉r'〉r, r,不是S的因子,ID为所述的定长二进制标识;r,、 r、 m、 i 为整数。 Calculating said fixed length binary subscript i ^ port entry should mark row group, comprising: a row index is calculated according to the equation group Ci (ID), the formula expressed as: Ci (ID) = [ID >> (ixr,) ] & (2m-1), i = O ... N-1; where >> represents the cyclic shift operation but, S> r '> r, r, S is not a factor, the ID of the fixed-length binary identification; r ,, r, m, i is an integer.

所述对密钥因子矩阵的所有列标进行置换,包括:直接选取数据序列作为列标组,该数据序列为:0, 1, ......, Nl,其中,N为密钥因子矩阵的列数。 The column index for all keys factor matrix replacement, comprising: directly select a data sequence beacon group as the column, the data sequence is: 0, 1, ......, Nl, where, N is a key factor the number of columns of the matrix.

所述对密钥因子矩阵的所有列标进行置换,包括:将数据序列顺序存放、 逆序存放或以随机的顺序存放在数组R[i]中,该数据序列为:G, 1, ......, Nl; The column index for all keys factor matrix replacement, comprising: storing the data sequence order, storing or reverse random order stored in an array R [i], the data sequence is: G, 1, ... ..., Nl;

其中iO, 1,……,Nl; N为密钥因子矩阵的列数。 Wherein iO, 1, ......, Nl; number of columns N is a key factor matrix.

所述对密钥因子矩阵的所有列标进行置换,还包括步骤: The column index for all keys factor matrix replacement, further comprising the step of:

步骤31,设置iO; Step 31, setting iO;

步骤32'判断ID mod (Ni) <Nil是否成立; Step 32 'is determined ID mod (Ni) <Nil holds;

步骤33,如果步骤32的判断结果为是,则将R[ID mod ( Ni )]和R[Nil】 交换位置;如果步骤32的判断结果为否,则执行步骤34; 步骤34:设置ii + l,判断i是否等于N-2; Step 33, if the determination result in step 32 is YES, then R [ID mod (Ni)] and R [Nil] exchange location; if the determination result is NO in step 32, step 34 is executed; Step 34: Set ii + l, i is equal to is determined N-2;

步骤35,如果步骤34的判断结果为否,则重复步骤32至步骤35;如果步骤34的判断结果为是,则置换结束,且经上述步骤处理后的数组RU]存放的是(0…M-1) 的一个置换。 Step 35, if the decision result in step 34 is NO, then repeat step 32 to step 35; if the decision result in step 34 is YES, then replace the end, and by the array RU after the processing of step] is stored in (0 ... M -1) a replacement.

所述对密钥因子矩阵的所有列标进行置换,还包括步骤: 步骤41,设置1 = 0; All of the column index key factor matrix replacement, further comprising the step of: step 41, setting 1 = 0;

步骤42'判断ID mod ( Ni ) ^0是否成立; Step 42 'is determined ID mod (Ni) ^ 0 holds;

步骤43,如果步骤42的判断结果为是,则将R[(ID mod (Ni ) )+i]和R[i] 交换位置;如果步骤42的判断结果为否,则执行步骤44; 步骤44,设置ii + l,判断i是否等于N-2; Step 43, if the determination result in step 42 is YES, then R [(ID mod (Ni)) + i] and R [i] exchange sites; If the determination result is NO in step 42, it executes step 44; step 44 provided ii + l, i is equal to is determined N-2;

步骤45,如果步骤44的判断结果为否,则重复步骤42至步骤45;如果步骤44的判断结果为是,则置换结束,且经上述步骤处理后的数组R[i]存放的是(G…M-1) 的一个置换。 Step 45, if the decision result in step 44 is NO, then repeat step 42 to step 45; if the decision result in step 44 is YES, then replace the end, and by the array R [i] after the step of processing is stored in (G ... M-1) of a replacement.

所述的步骤3包括:从密钥因子矩阵中选取与所述的行标组和列标组对应的密钥因子;利用所述密钥因子计算与所述定长二进制标识对应的密钥。 3 comprises the step of: selecting the row and column standard scale factor corresponding to the group key from the key factor matrix; key factor is calculated using the length binary identification key with the corresponding fixed. 在离散对数密码系统中,利用密钥因子按照公式计算密钥;其中,按照 In the discrete logarithm cryptosystem, a key is calculated according to the equation using a key factor; wherein, in accordance with

公式SKf堂,,,C,]m。 Formula SKf Hall ,,, C,] m. dp计算私钥SK^按照公式PK^ gSK'»图dp计算公钥PK,。 calculating the private key SK ^ dp public key PK is calculated according to the equation PK ^ gSK ' »FIG dp ,. ;

'=0 '= 0

其中,P和g为离散对数密码系统的参数,P是素数,g是有限域Fp生成元,g小于p, Ri为行标,Ci为列标,S[Ri,Ci]为与标识对应的私钥因子。 Wherein, P and g is a discrete number of parameters cryptosystem, P is a prime number, g is a finite field Fp generator, g is less than p, Ri is row index, Ci is column index, S [Ri, Ci] corresponding to the identification private key factors.

在椭圓曲线密码系统中,利用密钥因子按照公式计算密钥;其中,按照公 In the elliptic curve cryptosystem, using a key factor in accordance with the key formula; wherein, according to well

式SK,n- ts[《,C,] mod n计算私钥SU;按照公式SU = SK'D x G计算公钥PKm;其中, Formula SK, n- ts [ ", C,] mod n is calculated the SU private key; according to the equation SU = SK'D x G is calculated public key PKm; wherein,

n和G为椭圓曲线密码系统的^lt, G是椭圓曲线E (Fp)上的基点,n是素数,n是基点G的阶,Ri为行标,Ci为列标,S[Ri,Ci]为与标iW十应的私钥因子。 n and G is an elliptic curve cryptosystem ^ lt, G is a base point on the elliptic curve E (Fp), n is a prime number, n being the order of the base point G, Ri is row index, Ci is column index, S [Ri , Ci] iW scale factor and the private key corresponding to ten.

采用哈希函数或消息鉴別码函数将所述非定长二进制标识转换为定长二进制标识。 Using a message authentication code or hash function is a function of the non-fixed-length binary identification converted into fixed-length binary identification.

本发明的有益效果在于,简化了标识到密钥的映射计算,映射算法简洁高效,而且对于具有特殊性的标识可以实现标识到密钥的无沖突映射。 Advantageous effect of the invention that the identification is simplified to calculate the key mapping, the mapping algorithm is simple and efficient, but also for having specificity can be achieved without conflict identification ID to the key mapping. 附图说明 BRIEF DESCRIPTION

图1A和图1B分别为本发明的公钥因子矩阵和私钥因子矩阵的示意图; 图2为本发明一实施例的方法流程图; 图3为本发明一实施例的方法流程图; 图4为本发明一实施例的方法流程图; 图5为本发明另一实施例的方法流程图。 A schematic view of the public key factor matrix FIGS. 1A and 1B, respectively, of the present invention and the private key factor matrix; FIG. 3 a flowchart of a method embodiment of the present invention;; FIG. 2 is a flowchart of a method embodiment of the present invention in FIG. 4 the method of the present invention, a flowchart of an embodiment; FIG. 5 another embodiment of a flowchart of a method embodiment of the present invention.

具体实施方式 Detailed ways

以下结合附图详细说明本发明。 The present invention is described in detail below in conjunction with the accompanying drawings.

本发明提供了一种标识和密钥的映射方法,应用于基于标识的组合密钥管理系统中,在所述系统中已经生成密钥因子矩阵,所述的方法包括:根据定长二进制标识或由非定长二进制标识转换的定长二进制标识的长度值检验密钥因子矩阵的大小;根据所述定长二进制标识计算出密钥因子在密钥因子矩阵中相应的^亍标组和列标组,以定位密钥因子;利用所述行标组和列标组对应的密钥因子计算与所述定长二进制标识对应的密钥。 The present invention provides a method of identifying and mapping the key, a key management system is applied based on a combination of identification, the system key factor matrix has been generated, said method comprising: the fixed-length binary identification or size conversion of a non-fixed-length binary value identifying the length of the fixed-length binary identification checking key factor matrix; according to the fixed-length binary identification calculates a key factor in the key factor matrix corresponding to the right foot ^ beacon group and column labels group, to locate a key factor; factor is calculated using a key of the row and column labels beacon group corresponding to the group identifier and the long binary key corresponding to the predetermined.

其中,所述的标识可以是像IPv4、 IPv6地址这类具有一定特殊性的标识, 对于像IPv4、 IPv6地址这类标识,其特殊性在于,标识本身即为S比特(bit) 的二进制标识;对于原始标识是一个由字母、数字等混合元素组成的标识, 可以先通过哈希(HASH)或加密算法处理生成一个定长的二进制标识后再进行相应的映射计算,其中,将变长标识变换为定长值的方法可以采用消息鉴别码(MAC: Message Authentication Code)函数或普通的HASH算法。 Wherein the image identifier may be IPv4, IPv6 address having a certain degree of particularity of such identification, as for IPv4, IPv6 addresses such markings, which particularity that the identifier is itself a S bit (bit) of the binary identification; for the original identity is identified by a letter, number, etc. the mixing elements may be mapped to corresponding hash calculated by (the hASH) process or an encryption algorithm to generate a fixed-length binary identification again, wherein the variable-length identifier transformation a method for the fixed-length value of a message authentication code may be employed (MAC: message authentication code) function or general HASH algorithm.

总之,对于任意一种标识,均能通过本发明提供的标识和密钥的映射方法实现密钥和密钥拥有者标识之间的绑定。 In short, any identification, can achieve binding between the key and the owner of the key identified by the mapping method and the present invention provides the identification key.

在本发明的实施例中,密钥因子矩阵包括公钥因子矩阵和私钥因子矩阵, 密钥包括公钥和私钥,密钥因子包括公钥因子和私钥因子。 In an embodiment of the present invention, the key factor matrix includes a public key and a private key factor matrix factor matrices, including public and private key, public key factors comprising factor and a private key factor. 而且,在实施本发明的映射方法时,系统中已生成了大小为Mx N的密钥因子矩阵,其中N-2", M=2m。公、私钥因子矩阵是基于标识的组合密钥管理体制的基础。私钥是在私钥因子矩阵中按照一定的映射规则在每行(或列)各选取一个私钥因子通过相应运算计算出;相应的,公钥是在公钥因子矩阵中按照一定的映射规则在每行(或列)各选取一个公钥因子通过相应运算计算出。设私钥因子矩阵为SKM-[SJ,其中iO...Ml, j = 0...N-1;如果私钥是从私钥因子矩阵中每行各选取一个私钥因子计算出,则对N做限定,要求N-2", n为正整数;如果私钥是从私钥因子矩阵中每列各选取一个私钥因子计算出,则对M进行限定,要求M-2〜m为正整数。 Further, when mapping method embodiment of the present invention, the system has generated a key factor of size Mx N matrix, where N-2 ", M = 2m. Well, the private key factor matrix is ​​based on a combination of the identification key management the base system is a private key in the private key factor matrix according to a certain mapping rule is calculated for each row (or column) to select a private key of each factor by a respective operation; corresponding, according to the public key in a public key factor matrix certain mapping rule in each row (or column) to select a public key of each factor is calculated by the respective calculated. private key factor matrix is ​​provided SKM- [SJ, wherein iO ... Ml, j = 0 ... N-1 ; If the private key from the private key factor matrix in each line is calculated to select a private key factor is defined to be N, required N-2 ", n is a positive integer; each of the private key from the private key if the factor matrix each column select a private key factor is calculated, it is defined to be M, M-2~m required is a positive integer.

公私钥因子无论是按行选取还是按列选取其计算都是类似的。 Both the public and private key factor to select rows or columns are selected for calculating the like. 其区别仅在于: They differ only in:

如果是按行选取,则先计算列标组;再对所有的行标进行置换,即所得到的行标是所有行标的全排列的一种; If the row is selected, to calculate the column index set; then replacement of all the line standard, i.e. the standard line is obtained for all the subject line of a full array;

如果是按列选取,则先计算行标组;再对所有的列标进行置换,即所得到的列标组是所有列标的全排列的一种。 If it is selected by the column, the first row is calculated beacon group; further replaced all marked columns, i.e. column index group obtained all the columns are arranged in a full subject.

下面结合附图对本发明进行详细说明。 The present invention will be described in detail in conjunction with the accompanying drawings.

实施例一 Example a

在本实施例中,以公私钥因子是按行选取为例进行介绍。 In the present embodiment, the public and private key factor in selecting an example is described in rows.

如图1A和图1B所示分别为私钥因子矩阵和公钥因子矩阵示意图。 FIG 1A and 1B are a schematic view matrix and a public key for the private key factor matrix factor. 如图所 As shown in

示,私钥因子矩阵为SKM: [Sij],其中iO...Ml, j = 0...N-1;相应的公钥因 Shown, the private key factor matrix is ​​SKM: [Sij], wherein iO ... Ml, j = 0 ... N-1; by the corresponding public key

子头巨阵为PKM- [Pij],其中i-0…M-1, j = OJ-l。 Subheader downline to PKM- [Pij], where i-0 ... M-1, j = OJ-l.

在椭圓曲线密码系统中,设G是某椭圓曲线的基点,则P,尸S,jXG, In the elliptic curve cryptosystem, provided G is a base point of the elliptic curve, the P, dead S, jXG,

即PKM: SKMx G。 That PKM: SKMx G.

在离散对数密码系统中,T={g, p},其中p是素数,g是有限域Fp生成元,g 小于P,则Pu = gs"mod p。 In the discrete logarithm cryptosystem, T = {g, p}, where p is a prime number, g is the generator of the finite field Fp, g is less than P, the Pu = gs "mod p.

通常密钥因子矩阵的大小关系到系统的安全性,同时也和系统的规模(即用户数)是相关的,而标识的长度决定了系统中最大的用户数。 Magnitude relationship is usually the key factor matrix to the security of the system, and also the size of the system (i.e., the number of users) are associated, and the length indicator determines the maximum number of users the system.

下面,结合图2至图4说明本实施例,在图2至图4的流程图中,在实施本发明的映射方法之前,系统中已经生成了大小为MxN的密钥因子矩阵,其中N = 2n, M=2m。 Hereinafter, in conjunction with FIGS. 2 to 4 illustrates an embodiment according to the present embodiment, in the flowchart of FIG. 2 to FIG. 4, before mapping method embodiment of the invention, the system has generated a key factor of size MxN matrix, where N = 2n, M = 2m. 将本发明的映射方法分为三个过程:密钥因子矩阵的检验过程、 行标组和列标组的计算过程和密钥的计算过程。 The mapping method according to the present invention is divided into three processes: the key calculation process inspection factor matrix, and the rows labeled group calculation process and the key column labels group.

需要说明的是,因为对于像IPv4、 IPv6地址这类具有S bit的定长二进制标识和包含有由字母、数字等混合元素组成的标识,本发明的映射方法都可以应用。 Incidentally, as for the fixed-length binary identification and mapping method of the present invention contains the identification of the letters, numbers, and other elements as mixed IPv4, IPv6 address of the S bit having this type can be applied.

因此,对于使用类似于DNS域名的通用标识的系统,如图2所示,在进行密钥因子矩阵的^ft验之前,需要将通用标识转换为定长二进制标识,并将其直接作为以下过程中使用的定长二进制标识(见步骤SIOI)。 Thus, using the domain name of the DNS system is similar to universal identification, as shown, the key factor matrix is ​​performed before ft ^ experience, required to convert 2 universal identification fixed length binary identification, and the following procedure as a direct fixed-length binary identification (see step SiOI) used.

对于标识为S bit的定长二进制标识,如图4所示,可将其直接作为以下过程中使用的定长二进制标识(见步骤S301)。 For identification of the S bit fixed-length binary identification, as shown, may be directly used as fixed-length binary identification (see step S301) using the following procedure 4.

另外,如图3所示,还可以选取上述定长二进制标识的一部分作为以下过程中使用的定长二进制标识(见步骤S201 )。 Further, as shown in Figure 3, you may also select a part of said fixed length binary identification as a fixed-length binary identification (see step S201) using the following procedure. 例如:如果密钥生成中心所管理的范围是IPv6的一个子网,其子网前缀是n bit,那么系统在耳又标识时可以只考虑128-n bi.t的接口标识部分来决定密钥因子矩阵的大小以及标识和密钥间的映射。 For example: If the key generation center is managed by a range of IPv6 subnet, the subnet prefix which is n bit, the system can identify when the ear and consider only the interface identifier part 128-n bi.t determined key size, and mapping between identity and key factor matrix. 同理,对于一个使用类似于DNS域名的通用标识的系统,在将通用标识转换为定长标识时,可以根据系统的规模而只取经过哈希(HASH)函数或消息鉴別码(MAC: Message Authentication Code)函数计算得出的值的一部分进行映射计算即可。 Similarly, for a universal identification system used is similar to DNS domain name, the generic identification converted to the fixed length identifier, can only take hashed (the HASH) function or a message authentication code (MAC according to the size of the system: Message Authentication Code) part of the value calculated as a function mapping can be calculated.

一、密钥因子矩阵的检验过程 An inspection session key factor matrix

密钥因子矩阵的检验过程为根据定长二进制标识或由非定长二进制标识 Test session key factor matrix according to fixed-length binary identification or a non-fixed-length binary identification

转换的定长二进制标识的长度值^H全密钥因子矩阵的大小。 Identifies the length of fixed-length binary value conversion full size ^ H key factor matrix.

检验密钥因子矩阵的大小包括: Checking key factor matrix size comprising:

对定长二进制标识的长度值进行因子分解;根据因子分解的结果判断密 The length value of the fixed-length binary identification factoring; Analyzing the results of adhesion Factorization

钥因子矩阵的大小是否合适;如果所述的判断步骤的结果为是,则进行行标组和列标组的计算过程。 Key factor matrix is ​​appropriate size; if the result of the determination is YES in step row beacon group calculation process and beacon group of columns is performed. 如果所述的判断步骤的结果为否,则重新生成密钥因子矩阵。 If the result of the determination in step is NO, the rekeying factor matrix.

如图2、图3和图4所示,对密钥因子矩阵的检验过程具体如下: 将定长二进制标识的长度值按照S = M x r+k进行因子分解,其中k > 0且k<M (见步骤S102);如果r《n〈S,则密钥因子矩阵可用(见步骤S103);如果r〉n,则所述密钥因子矩阵太小,需要重新生成密钥因子矩阵(见步骤S109 ), 其中M为密钥因子矩阵的行数,S为定长二进制标识的长度值,k为O或正整数, r、 n为正整数。 2, 3 and 4, the inspection process key factor matrix as follows: the length of the fixed-length binary value identification in accordance with the factoring S = M x r + k, where k> 0 and k < M (see step S102); if r "n <S, the key factor matrix is ​​available (see step S103); If r> n, is the key factor matrix is ​​too small, it is necessary to regenerate the key factor matrix (see step S109), where M is the number of rows in the key factor matrix, S is the length of the fixed-length binary identification value, k is O or a positive integer, r, n is a positive integer.

举一个特例进行说明:将系统中的定长的S bit的二进制标识表示为: S = M xr (此时取k = 0 ),依然假定公私钥是在公私钥因子矩阵中按照一定的映射规则在每行各选取一个公私钥因子通过相应运算计算出,则密钥因子矩阵的大小可以耳又M x 2n', n, > n。 For a specific example will be described: the fixed length system S bit binary identity expressed as: S = M xr (case take k = 0), still assuming a certain public and private key mapping rule in accordance with public and private key factor matrix selecting each row in each well a factor calculated by the corresponding private key operation, the size of the factor matrix and the key can ear M x 2n ', n,> n. 例如在以IPv6地址为标识的系统中,IPv6地址是128 bit, 128 = 32 x 4,则密钥因子矩阵的大小可以取为32 x 24。 For example, in order to identify the IPv6 address system, IPv6 addresses are 128 bit, 128 = 32 x 4, the key factor matrix size can be taken as 32 x 24.

为了计算一个标识对应的公私钥,需要找出计算公私钥的密钥因子,要定位密钥因子,则需要根据标识计算出密钥因子在密钥因子矩阵中相应的行标纟且和列标组。 To calculate a public and private key corresponding to the identifier, it is necessary to find out the private key factors well calculated, to locate the key factor, a key factor to be calculated in the key factor matrix corresponding row and column standard Si and according to the identification mark group.

首先,进行列标组的计算。 First, calculate the column index set.

在上述的密钥因子矩阵的检验过程中,已经将定长二进制标识ID的长度值按照S:Mx r+k进行因子分解,其中k》0且k〈M, M为密钥因子矩阵的行数,S 为定长二进制标识的长度值。 In the above-described inspection process key factor matrix, the value of the long length has been fixed according to binary identification ID S: factoring Mx r + k, where k "0 and k <rows M, M is a key factor matrix number, S is the length of the fixed length binary identification value. 因为已经经过了上述密钥因子矩阵的检验过程, 因ji匕,该/^式中的r《n〈S。 Since the above-described process has been inspected key factor matrix, due ji dagger, the / ^ formula r "n <S.

下面提供了三种方法通过所述定长二进制标识ID来计算列标组的方法。 The following three methods provided by the method given column length binary identification beacon group ID is calculated.

第一种方法 the first method

如图2所示,计算过程如下: 2, is calculated as follows:

如果k〈nr,则计算列标组Ci (ID) = [ID》(ixr)]&(2n-1) , i=O...M—1;其中,〉〉表示循环移位运算(见步骤S104、 S105); If k <nr, the column index calculated group Ci (ID) = [ID "(ixr)] & (2n-1), i = O ... M-1; where >> represents the cyclic shift operation (see step S104, S105);

如果k》nr,则按照下述公式计算列标组C;(工D)(见步骤SllO): C"ID) = [ID»(i xr)]&(2',-1), i=O...M-[k-(nr)]-l, CJID) = (ID》[ix (r+l)]}&(2n- 1) , i=M-[k-(nr)] ...M-1 其中, >>表示循环移位运算。 If k "nr, group C column index is calculated according to the following equation; (station D) (see Step SllO): C" ID) = [ID »(i xr)] & (2 ', - 1), i = O ... M- [k- (nr)] - l, CJID) = (ID "[ix (r + l)]} & (2n- 1), i = M- [k- (nr)]. ..M-1 where >> represents a cyclic shift operation.

第二种方法 The second method

如图3所示,按下述公式计算列标组Ci(ID)(见步骤S205 ): 3, the column index is calculated by the following equation group Ci (ID) (see step S205):

Ci(ID) = (ID》[ix (r+l)]}&(2n - 1) , i=O...M-1 Ci (ID) = (ID "[ix (r + l)]} & (2n - 1), i = O ... M-1

其中, >>表示循环移位运算。 Wherein, >> represents a cyclic shift operation. 第三种方法 The third method

如图4所示,按下述公式计算列标组Ci(ID)(见步骤S305 ): C"ID) = [ID》(ix r')]&(2n - 1) , i:0…Ml 其中,》表示循环移位运算,S〉r'〉r,要求r,不是的S因子。 As shown, the column index calculated by the following equation group Ci (ID) (see step S305) 4: C "ID) = [ID" (ix r ')] & (2n - 1), i: 0 ... Ml wherein "denotes a cyclic shift operator, S> r '> r, requirement r, not a factor of S.

其次,进^"行标组的计算。 Next, into ^ "group row index is calculated.

密钥因子从密钥因子矩阵的每一行选取一个,因此行标组是(0.. .M-1)的一个置换,如图2所示,最简单的方式就是直接选取O...M-1(见步骤S106)。 The key factor is selected from the key factor matrix each row a, row labeled thus set is (0 .. .M-1) is a permutation, as shown, the easiest way is to directly select the O 2 ... M 1 (see step S106). 此外,还可以通过下述两种方法进行行标置换: 第一种方法 In addition, the line may also be replaced by the following two methods standard: The first method

如图3所示,见步骤S206 ~S212,把O...Ml顺序放在数组R[O] ...R[M-1]。 As shown in FIG. 3, see steps S206 ~ S212, the O ... Ml sequence on the array R [O] ... R [M-1]. 然后执行下面的运算步骤: Then perform the following operation steps:

1) 设置i- 0; 1) Set i- 0;

2) 判断工D mod (Mi ) <Mil是否成立; 2) determination station D mod (Mi) <Mil holds;

3) 如果2)的结果为是,则将R[ID mod (Mi)]和R [Mi-1]交换位置; 如果2)的结果为否,则执行4); 3) if 2) the result is YES, [ID mod (Mi)] and R [Mi-1] will exchange positions R & lt; 2 if) the result is NO, execution 4);

4) 设置i-i+l,重复步骤2)至4),直到iM-2时结束。 4) Set i-i + l, repeating steps 2) through 4) until the end of 2 iM-. 经过上面处理后的数组R[O]…R[Ml]存放的是(O...M-1)的一个置换。 After the above treatment the array R [O] ... R [Ml] is stored (O ... M-1) is a permutation. 则置换后的数組存放的数据序列为行标组。 Array data sequence is stored after replacing the line marked group. 第二种方法 The second method

如图4所示,见步骤S306至步骤S312 ,把0…M-1逆序放在数组A[0]…A[M-1]。 As shown, see step S306 to step S312, the 0 ... M-1 the reverse order on the array A 4 [0] ... A [M-1]. 然后执行下面的运算步骤: l,)设置1= 0; Then execute the following operation steps: l,) 1 = 0 is provided;

2,)判断ID mod (Mi) -O是否成立; 2) determination ID mod (Mi) -O holds;

3,)如果2,)的判断结果为是,则将A[ (IDmod (Mi ) )+i]和A[i]交换位置;如果2')的判断结果为否,执行4'); 3) if 2) the determination result is YES, the A [(IDmod (Mi)) + i] and A [i] switched positions; if 2 '), the determination result is NO, execution 4');

4')设置i^i+l,重复步骤2,)至4'),直到卜M-2时结束。 4 ') is provided i ^ i + l, repeat step 2) to 4') until the end of Bu 2 M-.

经过上面处理后的数组A[O] ...A[Ml]存放的是(O...M-1)的一个置换。 After the above treatment the array A [O] ... A [Ml] is stored (O ... M-1) is a permutation. 则置换后的数组存放的数据序列为行标组。 Array data sequence is stored after replacing the line marked group.

在图3所示的步骤S206和图4所示的步骤S306中,把O...Ml放在数组中的顺序可以是顺序存放、逆序存放、也可以是以随机的顺序存》丈。 In the step shown in FIG. 3 S206 and step S306 shown in FIG. 4, the O ... Ml in order of the array may be sequentially stored, stored in reverse order, may be stored in a random order. "Feet.

三、密钥的计算过程 Third, the key calculation process

在计算出所述标识对应的列标组和行标组后,从密钥因子矩阵中选取与所述的行标组和列标组对应的密钥因子(见步骤S107)。 After calculating the row index and column index group corresponding to the identifier of the group, and selecting from the key factor matrix according to the row index and column scale factor groups corresponding to the key (see step S107). 例如:设密钥因子矩阵的大小为16x64,即M-16, N = 64,组成公私钥的密钥因子是按行从密钥因子矩阵中选取的。 For example: When the key factor matrix size of 16x64, i.e., M-16, N = 64, the composition of the public private key factor is selected by row from the key factor matrix. 假如对于一个标识ID,根据上面给出的映射方法,可以计算出作为列标16个值为(8, 2, 62, ......, 33),相应的行标置换 If an identification ID for, according to mapping method given above, can be calculated as the column index value is 16 (8, 2, 62, ......, 33), the corresponding row permutation standard

(3, 8, 1, ......, 12),于是在私钥因子矩阵中取S3力S8,2, Su2, ......, S12.33 (3, 8, 1, ......, 12), then taken up in force S3 of the private key factor matrix S8,2, Su2, ......, S12.33

计算出ID对应的私钥;相应的标识ID对应的公钥/人^^钥因子矩阵中取 Calculate the private key corresponding to the ID; corresponding identifier ID corresponding public key / person ^^ fetch key factor matrix

P3, 8 , Pg' 2 , Pl, 62 , ......, Pl2, 33计异出。 P3, 8, Pg '2, Pl, 62, ......, Pl2, 33 meter out different.

在得到标识对应的行标组和列标组后,再进行公私钥对的计算(见步骤S108 )。 After obtaining the standard row and column corresponding to the group identification mark, and then calculates the public-private key pair (see step S108). 由于私钥是需要保密的,只有密钥管理中心才能保存私钥因子矩阵,私钥的生成只能在密钥管理中心进行,生成后发放给相应的实体,系统中的每个实体并不知道用于计算自身私钥的每个私钥因子;每个标识的公钥在整个密钥管理中心所管理的域内是公开的,所以公钥因子矩阵是需要公开的。 Because the private key is to be kept confidential, and only key management center to save the private key factor matrix, the private key can only be generated in a key management center, after generating issued to the appropriate entities, each entity in the system does not know each private key factor for calculating its own private key; each identified throughout the public key management center is managed by the public domain, the public key factor matrix is ​​the need to open.

在离拟于数密码系统,系统^l史THg, p},其中p是素数,g是有限域Fp生成元,g小于P。 In several cryptographic system intends to leave the system ^ l history THg, p}, where p is a prime number, g is the generator of the finite field Fp, g is smaller than P. 一个标识ID对应的列标为C。 A corresponding identification ID column labeled C. , C广Oh,相应的行标为R。 , C wide Oh, the corresponding line labeled R. , R,-Rw, S [Ri, Ci]为与标识对应的私钥因子,则标识ID对应的私钥: , R, -Rw, S [Ri, Ci] is a factor of the private key corresponding to the identifier, the identifier ID corresponding private key:

SKID = Z肌c;.] mod p; SKID = Z muscle c ;.] mod p;

,=0 , = 0

对应的公钥: The corresponding public key:

PKID = fl尸[取C/] m。 PKID = fl dead [taken C /] m. dp = (gS【R"] x gs[R"C'].. . x gS【R"'c]") mod p =(g"。】"【w..〜,,〗)mod p = g^mod p; dp = (gS [R "] x gs [R" C '] ... x gS [R "' c]") mod p = (g ".]" [w..~ ,,〗) mod p = g ^ mod p;

如果是椭圆曲线密码系统,系统参数T: (a,b, G,n,p),其中p是正整数, Fp是有限域,a, b是Fp上的正整数,G是椭圆曲线E(Fp)上的基点,n是素数, 是基点G的阶。 If it is the elliptic curve cryptosystem, system parameters T: (a, b, G, n, p), where p is a positive integer, Fp is a finite field, a, b is a positive integer of Fp, G is an elliptic curve E (Fp the base point), n is prime, is the order of the base point G. 一个标识ID对应的列标为C。 A corresponding identification ID column labeled C. , C,〜(V,,相应的行标为R。, R,~RM—i, 则标识ID只t应的私钥: , C, ~ (V ,, corresponding row labeled R., R, ~ RM-i, only the identification ID t corresponding to the private key:

SKID = mod n; SKID = mod n;

只十应的7>钥: Should only ten of 7> key:

SKID = Z尸[尽.,C/]齢d P = SKID x G。 SKID = Z corpse [exhausted., C /] Ling d P = SKID x G.

实施例二 Second Embodiment

在本实施例中,根据图5对公私钥因子按列选取进行说明。 In the present embodiment, the public and private key factor in accordance with FIG. 5 pairs selected by the column will be described. 公私钥因子无论是按行选取还是按列选取,其计算都是类似。 Both the public and private key factor to select rows or columns selected, which are calculated similarly.

同样采用如图1A和图1B的私钥因子矩阵和公钥因子矩阵。 FIG using the same public key and a private key factor matrix factor matrices 1A and 1B. 执行本实施例的方法之前,系统中已经生成了大小为MxN的密钥因子矩阵,其中N-2", M=2m。 在本实施例中将密钥因子矩阵的大小表示为S-2mxN。本实施例的映射方法也分为三个过程:密钥因子矩阵的检验过程、行标组和列标组的计算过程和密钥的计算过程。同样对于向IPv4、 IPv6地址这类具有S bit的定长二进制标识和包含有由字母、数字等混合元素组成的非定长的二进制标识,本发明的映射方法都可以使用。在图5的流程图中,在实施本发明的映射方法之前,系统中已经生成了大小为MxN的密钥因子矩阵,其中N-2", M=2m, m为正整^:。 Prior to performing the method according to the present embodiment, the system has generated the key factor matrix of size MxN, where N-2 ", M = 2m. Example key factor in the size of the matrix is ​​expressed as S-2mxN in the present embodiment. mapping method of the present embodiment is also divided into three processes: the process of calculating the key factor matrix inspection process, and the calculation standard key row and column for the same beacon group of IPv4, IPv6 address having such a S bit. fixed length and comprising a non-binary identification of fixed length binary identification letters, numbers, and other elements of the hybrid mapping method of the present invention can be used in the flowchart of FIG. 5, prior to mapping method embodiment of the invention, the system has generated a key factor of size MxN matrix, where N-2 ", m = 2m, m is a positive integer ^ :. 如图5所示的标识为通用标识,需要将标识转换为二进制标识,并选取一部分作为下述步骤中的定长二进制标识(见步骤S401)。 As shown in Figure 5 identifies the universal identification, need to be identified is converted to binary identification, and select a portion of the following steps as fixed-length binary identification (see step S401).

一、密钥因子矩阵的检验过程 An inspection session key factor matrix

密钥因子矩阵的检验过程与实施例一相同,只是在因子分解时,以密钥因子矩阵的列数N代替密钥因子矩阵的行数M。 A verification process same as the key factor matrix, except when factoring in the number of columns N in place of the number of key factor matrix row key factor matrix M. 具体过程如图5的步骤S402、步骤S403 和步骤S409:将定长二进制标识的长度值S按照S = N x r+k进行因子分解,其中k > 0 且k〈N;如果r《m〈S,则密钥因子矩阵可用;如果r〉m,则所述密钥因子矩阵太小,需要重新生成密钥因子矩阵。 Step 5 S402, step S403, and the specific process step shown in FIG S409: the length of the fixed-length binary value identification in accordance factoring S S = N x r + k, where k> 0, and k <N; if r "m < S, the key factor matrix is ​​available; if r> m, is the key factor matrix is ​​too small, need to generate a key factor matrix.

在本实施例中由于是按列选取密钥因子,因此,需要现进行行标组的计算, 再对列标组进行置换。 In the present embodiment, since the key factor is selected by the column, therefore, we need to be calculated current beacon group of rows, and then the column index permutation groups.

首先,进行行标组的计算。 First, the calculation line beacon group.

在上述的密钥因子矩阵的检验过程中,已经将定长二进制标识ID按照S = Nx r+k进行因子分解,其中k》0且KN, N为密钥因子矩阵的列数。 In the above-described series of inspection process key factor matrix, it has a fixed-length binary identification ID factoring according to S = Nx r + k, where k "0 and KN, N is the key factor matrix. 因为已经经过了密钥因子矩阵的检验过程,因此,该公式中的r《m〈S。 Since the inspection process has elapsed key factor matrix, and therefore, the equation r "m <S. 通过所述的定长二进制标识工D来计算行标组同样有三种方法: Calculated by said fixed length binary identification ENGINEERING row labeled D group also has three ways:

第一种方法(图中未示出)是按照如下的公式计算行标组Ci(ID): 如果k〈mr, Ci(ID)=[工D》(ixr)]&(2m-1) , i=O...Nl The first method (not shown) is to calculate the standard row group Ci (ID) according to the following equation: If k <mr, Ci (ID) = [workers D "(ixr)] & (2m-1), i = O ... Nl

其中,》表示循环移位运算; 如果k》mr, C,(ID) = [ID»(ixr)]&(2m- 1) , i-0…N-[k-(ra—r) ]-l , Ci(工D) = (ID》[ix (r+l)]}&(2m-1),卜M-[k-(mr)]…Nl, 其中,》表示循环移位运算。第二种方法(图中未示出)按照如下的公式计算行标组C, (ID): Wherein "denotes a cyclic shift operation; if k" mr, C, (ID) = [ID »(ixr)] & (2m- 1), i-0 ... N- [k- (ra-r)] - l, Ci (work D) = (ID "[ix (r + l)]} & (2m-1), Bu M- [k- (mr)] ... Nl, where" denotes a cyclic shift operation. The first two kinds of method (not shown) group C row index is calculated according to the formula, (ID):

Ci(ID) = (ID》[ix (r+l)]}&(2m - 1) , i=0...Nl Ci (ID) = (ID "[ix (r + l)]} & (2m - 1), i = 0 ... Nl

其中, >>表示循环移位运算。 Wherein, >> represents a cyclic shift operation. 第三种方法,见图5中的步骤S405,按照如下的公式计算行标组Ci(ID), The third method, see Step 5 S405, calculation line beacon group Ci (ID) according to the formula,

Ci(ID) = [ID》(ixr,)]&(2m-1) , i=O...N-1 其中,》表示循环移位运算,S〉r'〉r,要求r'不是S的因子。 Ci (ID) = [ID "(ixr,)] & (2m-1), i = O ... N-1 where," denotes a cyclic shift operator, S> r '> r, requires r' not S factor. 接着,进行列标组的计算。 Next, calculate the column index set.

密钥因子从密钥因子矩阵的每一列选取一个,因此列标组是(O...Nl)的一个置换,最简单的方式就是直接选取O...N-1 (图中未示出)。 A key factor selected from each column key factor matrix, thus is column index group (O ... Nl) is a permutation, the easiest way is to directly select O ... N-1 (not shown in FIG. ). 此外,同样进行置换也可以通过实施例一中的两种方法稍作变化即可: Further, the same may be replaced by two methods can be a slight variation of the embodiment of an embodiment:

第一种方法(图中未示出),把O...Nl顺序存放、逆序存放或以随机的顺序存放在数组R[O]...R[N-1]。 The first method (not shown), the storage O ... Nl order, reverse or stored in a random order is stored in the array R [O] ... R [N-1]. 然后执行下面的运算步骤: Then perform the following operation steps:

1) 设置i- 0; 1) Set i- 0;

2) 判断ID mod (Ni) <Nil是否成立; 2) Analyzing ID mod (Ni) <Nil holds;

3) 如果2)的结果为是,则将R[ID mod ( Ni )]和R [Ni-1]交换位置; 如果2)的结果为否,则执行4); 3) if 2) the result is YES, [ID mod (Ni)] and R [Ni-1] will exchange positions R & lt; 2 if) the result is NO, execution 4);

4) 设置1 = 1+1,重复步骤2)至4),直到iN-2时结束。 4) Set 1 + 1 = 1, repeat steps 2) through 4) until the end of 2 iN-. 经过上面处理后的数组R[O]...R[Nl]存放的是(O..,Nl)的一个置换。 After the above treatment the array R [O] ... R [Nl] is stored (O .., Nl) is a permutation. then

置换后的数组存放的数据序列为列标组。 Replacement data sequence stored in an array column index group.

如图5的步骤S406至步骤S412所示为第二种方法,把O...Nl顺序存放、逆序存放或以随机的顺序存放在数组A[O] ...A[N-1]。 To step S406 of FIG. 5 shows a second method step S412, the O ... Nl sequentially stored, stored or reverse random order stored in the array A [O] ... A [N-1]. 然后执行下面的运算步骤: Then perform the following operation steps:

l')设置卜0; l ') disposed Bu 0;

2,)判断ID mod (Ni)力0是否成立; 2) determination ID mod (Ni) Force 0 holds;

3,)如果2,)的结果为是,则将A[ ( IDmod (Ni ) ) +i]和A [i]交换位置; 如果2')的结果为否,则执行4'); 3) if 2,) the result is YES, the A [(IDmod (Ni)) + i] and A [i] switched positions; if 2 'result) is NO, execution 4');

4,)设置i-i+l,重复步骤2,)至4,),直到i,-2时结束。 4) Set i-i + l, repeat step 2) to 4), until i, -2 ends. 经过上面处理后的数组A[O]..从[1^_1]存放的是(0..^-1)的一个置换。 After the above treatment the array A [O] .. from [1 ^ _1] is stored in (0 .. ^ --1) is a permutation. then

置换后的数组存放的数据序列为列标组。 Replacement data sequence stored in an array column index group.

三、密钥的计算过程与实施例一相同,在此不再赘述。 Third, the key calculation process as in Example I, is not repeated herein.

通过本发明,筒化了标识到密钥的映射方法,映射方法简洁高效,易于 By the present invention, the identification of the cartridge to the key mapping method, the mapping method is simple and efficient, easy to

实现,而且对于IPv4、 IPv6这类的标识可以实现标识到密钥的无沖突映射。 Implementation, but also for IPv4, IPv6 can achieve this kind of identification to identify key conflict-free maps. 上述实施例仅用于说明本发明,而非用于限定本发明。 The above-described embodiments of the present invention is illustrative only, not intended to limit the present invention.

Claims (24)

1.一种标识和密钥的映射方法,应用于基于标识的组合密钥管理系统中,在所述系统中已经生成密钥因子矩阵,其特征在于,所述方法包括步骤: 步骤1,根据定长二进制标识或由非定长二进制标识转换的定长二进制标识的长度值检验密钥因子矩阵的大小,所述密钥因子矩阵的大小表示为M×2n;其中,包括:对定长二进制标识的长度值进行因子分解按照公式进行,该公式的表达式为:S=M×r+k;其中,S:定长二进制标识的长度值;M:密钥因子矩阵的行数;2n:密钥因子矩阵的列数;k≥0且k<M;S、M、k、r、n均为整数;根据因子分解的结果判断密钥因子矩阵的大小是否合适;若判断结果为合适,则执行步骤2; 步骤2,根据所述定长二进制标识计算出密钥因子在密钥因子矩阵中相应的行标组和列标组;其中,包括:计算与所述定长二进制标识相应的列标 1. A method of identifying and mapping the key, a key management system is applied based on a combination of identification, in the system has generated a key factor matrix, wherein, said method comprising the steps of: Step 1, according to size length value checking key factor matrix or converted fixed-length binary identification of a non-fixed-length binary identification of the fixed-length binary identification, the key factor matrix size expressed as M × 2n; wherein comprising: fixed-length binary length value identifies the factoring in accordance with the formula, the formula is the expression: S = M × r + k; wherein, S: the length of fixed-length binary identification value; M: the number of rows key factor matrix; 2n: number of columns in the key factor matrix; k ≧ 0 and k <M; S, M, k, r, n are integers; Analyzing the results of the key factor matrix factorization is appropriate size; if the judging result is appropriate, step 2 is performed; step 2, the key factor is calculated corresponding row and column marked in the beacon group key factor matrix according to the fixed length binary identification;, comprising: calculating the respective fixed-length binary identification column Headings ;对密钥因子矩阵的所有行标进行置换,得到与所述定长二进制标识相应的行标组; 步骤3,利用所述行标组和列标组对应的密钥因子计算与所述定长二进制标识对应的密钥。 ; All lines marked on the key factor matrix replacement, to obtain the corresponding row length binary identification group and the fixed standard; step 3, using the standard row and column corresponding to the beacon group and the fixed key factor calculation long binary key corresponding to the identifier.
2. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,所述步骤l 还包括:若判断结果为不合适,则重新生成密钥因子矩阵。 The identification and key mapping method according to claim 1, wherein said step l further comprising: determining if the result is not appropriate, the rekeying factor matrix.
3. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,判断密钥因子矩阵的大小是否合适是指:判断r是否大于n;若判断结果为r《n〈S,则该密钥因子矩阵的大小合适; 若判断结果为r〉n,则所述密钥因子矩阵的大小不合适; 其中,S:定长二进制标识的长度值;n、 r均为整数。 The mapping method of claim 1 and a key identifier claims, characterized in that the key factor matrix is ​​determined whether the size of suitable means: determines whether is greater than n-r; if the judgment result is r "n <S, then the key factor matrix of appropriate size; if the judging result r> n, the size of the key factor matrix is ​​inappropriate; wherein, S: value of the long fixed length binary identification; n, r are integers.
4. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,所述计算与定长二进制标识相应的列标组,包括:判断k〈nr是否成立;如果判断结果为是,则按照公式计算列标组Ci(ID),该公式的表达式为: Ci(ID) = [ID》(ixr)]&(2n-l) , i=0..-M-1;其中, >>表示循环移位运算,ID 为所述定长二进制标识;如果判断结果为否,则按照公式计算列标组Ci(ID),该公式表达式为: Ci(ID) = [ID〉>(ixr)]&(2n-1), i=0...M-[k-(nr)]-l,和Ci(ID) = {ID»[ix (r+l)]}&(2n-l) , i=M-[k-(nr)]…Ml; 其中,〉>表示循环移位运算,ID为所述定长二进制标识;M、 k、 n、 r、 i 为整数。 The mapping method of claim 1 and the identification key as claimed in claim wherein said calculating a corresponding fixed-length binary identification mark column group, comprising: determining k <nr are satisfied; if the determination result is yes, the column index is calculated according to the equation group Ci (ID), is an expression of the equation: Ci (ID) = [ID "(ixr)] & (2n-l), i = 0 ..- M-1; wherein >> denotes a cyclic shift operation, said fixed length binary ID identifier; if the determination result is NO, the column index is calculated according to the equation group Ci (ID), the formula expressed as: Ci (ID) = [ID >> (ixr)] & (2n-1), i = 0 ... M- [k- (nr)] - l, and Ci (ID) = {ID »[ix (r + l)]} & (2n -l), i = M- [k- (nr)] ... Ml; where >> represents the cyclic shift operation, the ID of the fixed length binary identification; M, k, n, r, i is an integer.
5. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,所述计算与定长二进制标识相应的列标组,包括:按照公式计算列标组Ci (ID),该公式表达式为: Ci (ID) = {ID〉> [ix (r十l) ]} & (2n-1) , i=0...Ml;其中,〉〉表示循环移位运算;ID为定长二进制标识;n、 r、 i为整数。 The mapping method of claim 1 and the identification key as claimed in claim wherein said calculating a corresponding fixed-length binary identification mark column group, comprising: a column index calculated according to Formula group Ci (ID), the formula expression is: Ci (ID) = {ID >> [ix (r ten l)]} & (2n-1), i = 0 ... Ml; where >> represents the cyclic shift operation; ID is constant length binary identification; n, r, i is an integer.
6. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,所述计算与定长二进制标识相应的列标组,包括::換照公式计算列标组Ci (ID),该公式表达式为: Ci (ID) = [ID>〉 (ixr,) ] & (2n — 1) , i=0...M—l其中, >〉表示循环移位运算,S〉r,〉r, r,不是S的因子,ID为定长二进制标识;S为定长二进制标识的长度值;r、 r,、 n、 i为整数。 The mapping method of claim 1 and a key identifier claims, characterized in that the calculation corresponding to the fixed-length binary identification mark column groups, including :: exchange column index is calculated according to equation group Ci (ID), the expression of formula: Ci (ID) = [ID >> (ixr,)] & (2n - 1), i = 0 ... M-l wherein the cyclic shift operation >>, S> r, > r, r, S is not a factor, ID of fixed-length binary identification; S is a fixed-length binary identification of the length value; r, r ,, n, i is an integer.
7. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有行标进行置换,包括:直接选取数据序列作为行标组,该数据序列为:G, 1,……,Ml,其中, M为密钥因子矩阵的行数。 The identification and key mapping method according to claim 1, characterized in that the replacement of all the key factor matrix row index, comprising: selecting a data sequence as a direct line beacon group, the data sequence is : G, 1, ...... rows, Ml, wherein, M being the key factor matrix.
8. 根据权利要求1所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有行标进行置换,包括:将数据序列顺序存放、逆序存放或以随机的顺序存放在数组R[i]中,该数据序列为:0, 1, ......, Ml;其中iO, 1,……,Ml; M为密钥因子矩阵的行凄t。 The mapping method of claim 1 and a key identifier claims, characterized in that all the rows of the standard replacement key factor matrix, comprising: storing the data sequence order, or reverse stored in a random order stored in the array R [i], the data sequence is: 0, 1, ......, Ml; wherein iO, 1, ......, Ml; row sad t M is the key factor matrix.
9. 根据权利要求8所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有行标进行置换,还包括步骤:步骤ll,设置iO;步骤12,判断ID mod (Mi) <Mil是否成立;步骤13,如果步骤12的判断结果为是,则将R[IDmod (Mi )]和R[Mi-1] 交换位置;如果步骤12的判断结果为否,则执行步骤14; 步骤14,设置ii + l,判断i是否等于M-2;步骤15,如果步骤14的判断结果为否,则重复步骤12至步骤15;如果步骤14 的判断结果为是,则置换结束,且经上述步骤处理后的数组R[i]存放的是(0…Ml)的一个置换。 9. The method of claim 8 identification mapping and key according to claim, characterized in that all the rows of the standard key factor matrix replacement, further comprising the step of: step ll, provided iO; Step 12, it is determined ID mod (Mi) <Mil holds; step 13, if the determination result in step 12 is YES, then R [IDmod (Mi)] and R [Mi-1] exchange sites; If the determination result in step 12 is NO, then step 14; step 14, set ii + l, determines whether i is equal to M-2; step 15, if the decision result in step 14 is NO, then repeat step 12 to step 15; if the decision result in step 14 is YES, then replace the end, and by the array R [i] after the above process is stored in the step (0 ... Ml) is a permutation.
10. 根据权利要求8所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有行标进行置换,还包括步骤:步骤21,设置i^0;步骤22'判断ID mod (Mi) ^0是否成立;步骤23,如果步骤22的判断结果为是,则将R[(IDmod (Mi ) )+i]和R[i] 交换位置;如果步骤22的判断结果为否,则执行步骤24; 步骤24,设置ii + l,判断i是否等于M-2;步骤25,如果步骤24的判断结果为否,则重复步骤22至步骤25;如果步骤24 的判断结杲为是,则置换结束,且经上述步骤处理后的数组R[i]存放的是(0… Ml)的一个置换。 10. The method of claim 8 identification mapping and key according to claim, characterized in that all the rows of the standard key factor matrix replacement, further comprising the step of: step 21, set i ^ 0; step 22 ' Analyzing ID mod (Mi) ^ 0 holds; step 23, if the determination result in step 22 is YES, then R [(IDmod (Mi)) + i] and R [i] exchange location; if the judgment result of the step 22 NO, step 24; step 24, set ii + l, determines whether i is equal to M-2; step 25, if the judgment result of step 24 is NO, then repeat step 22 to step 25; result of determination, if the step 24 Gao is YES, then replace the end, and by the array R [i] after the above process is stored in the step (0 ... Ml) is a permutation.
11. 一种标识和密钥的映射方法,应用于基于标识的组合密钥管理系统中, 在所述系统中已经生成密钥因子矩阵,其特征在于,所述方法包括步骤:步骤l,根据定长二进制标识或由非定长二进制标识转换的定长二进制标识的长度值检验密钥因子矩阵的大小,所述密钥因子矩阵的大小表示为2m x N; 其中,包括:对定长二进制标识的长度值进行因子分解按照公式进行,该公式的表达式为:S = Nxr+k;其中,S:定长二进制标识的长度值;2m:密钥因子矩阵的行数;N:密钥因子矩阵的列数;k > O且KN; S、 N、 k、 r、 m为整数; 根据因子分解的结果判断密钥因子矩阵的大小是否合适;若判断结果为合适, 则执行步骤2;步骤2,根据所述定长二进制标识计算出密钥因子在密钥因子矩阵中相应的行标组和列标组;其中,包括:计算与所述定长二进制标识相应的行标组; 对密 11. A method of identifying and mapping the key, a key management system is applied based on a combination of identification, in the system has generated a key factor matrix, wherein, said method comprising the steps of: a step L, according to staple size length value converted from binary identification or non-identification of the fixed-length binary fixed-length binary identification checking key factor matrix, said key factor matrix is ​​expressed as size 2m x N; wherein comprising: fixed-length binary length value identifies the factoring in accordance with the formula, the formula is the expression: S = Nxr + k; wherein, S: the length of fixed-length binary identification value; 2m: number of rows in the key factor matrix; N: key the number of columns factor matrix; k> O and KN; S, N, k, r, m is an integer; determining the key factor matrix according to a result of the appropriate size for the factorization; if the judging result is appropriate, then the step 2; step 2, according to the fixed-length binary identification calculates a key factor corresponding row and column marked in the beacon group key factor matrix; wherein, comprising: calculating the fixed length binary identification mark corresponding row group; for dense 因子矩阵的所有列标进行置换,得到与所述定长二进制标识相应的列标组;步骤3,利用所述行标组和列标组对应的密钥因子计算与所述定长二进制标识对应的密钥。 All columns were replaced with scale factor matrix, to obtain the corresponding column length binary identification mark with the predetermined group; step 3, a key factor is calculated using the standard row and column corresponding to the standard set of fixed length corresponding to binary identification key.
12. 根据权利要求11所述的标识和密钥的映射方法,其特征在于,所述步骤l还包括:若判断结果为不合适,则重新生成密钥因子矩阵。 12. The method according to the identification and mapping of keys according to claim 11, characterized in that said step l further comprising: determining if the result is not appropriate, the rekeying factor matrix.
13. 根据权利要求11所述的标识和密钥的映射方法,其特征在于,判断密钥因子矩阵的大小是否合适是指:判断r是否大于m;若判断结果为r《m〈S,则该密钥因子矩阵的大小合适; 若判断结果为r〉m,则所述密钥因子矩阵的大小不合适; 其中,S:定长二进制标识的长度值;m、 r为整数。 13. The method of mapping the identifier 11 and key claim, wherein determining whether the size of the key factor matrix suitable means: determining whether r is greater than m; if the judging result r "m <S, then the key factor matrix of appropriate size; if the judging result r> m, then the size of the key factor matrix is ​​inappropriate; wherein, S: value of the long fixed length binary identification; m, r are integers.
14. 根据权利要求11所述的标识和密钥的映射方法,其特征在于,所述计算与定长二进制标识相应的行标组,包括:判断k〈mr是否成立;若判断结果为是,则按照公式计算行标组Ci(ID),该公式的表达式为: d (ID) = [ID〉〉 (ixr) ] & (2M) , i4"Nl;若判断结果为否,则按照公式计算行标组Ci(ID),该公式表达式为: Ci(ID) = [ID》(ixr)]&(2m-l), i-0…N-[k—(mr)]-l,和Ci(ID) = {ID》[ix (r+l)]}&(2ra-1) , i=N-[k-(mr)]…Nl; 其中, >>表示循环移位运算,ID为所述的定长二进制标识;N、 k、 r、 m、 i 为整数。 14. The method of mapping and identification of a key as claimed in claim wherein said calculation corresponding to the fixed-length binary identification mark row group, comprising: determining k <mr is satisfied; if the judgment result is YES, the row index is calculated according to the equation group Ci (ID), the expression of the equation is: d (ID) = [ID >> (ixr)] & (2M), i4 "Nl; if the judging result is NO, according to the formula standard calculation line group Ci (ID), the formula expressed as: Ci (ID) = [ID "(ixr)] & (2m-l), i-0 ... N- [k- (mr)] - l, and Ci (ID) = {ID "[ix (r + l)]} & (2ra-1), i = N- [k- (mr)] ... Nl; wherein the cyclic shift operation >>, ID said fixed length binary identification; N, k, r, m, it is an integer.
15. 根据权利要求11所述的标识和密钥的映射方法,其特征在于,所述计算与定长二进制标识相应的行标组,包括:按照公式计算行标组Ci (ID),该公式表达式为: (MID) = UD》U x (r+l)]}&(2ra-l), i=0.Jl;其中, >>表示循环移位运算,ID为所述的定长二进制标识;N、 r、 m、 i 为整数。 15. The method of mapping and identification of a key as claimed in claim wherein said calculation corresponding to the fixed-length binary identification mark row group, comprising: a row index is calculated according to the equation group Ci (ID), the formula expression is: (MID) = UD "U x (r + l)]} & (2ra-l), i = 0.Jl; where >> represents the cyclic shift operation, the ID of the fixed-length binary identification; N, r, m, i is an integer.
16. 根据权利要求1或11所述的标识和密钥的映射方法,其特征在于,所述计算与定长二进制标识相应的行标组,包括:按照公式计算行标组Ci (ID),该公式表达式为: Ci(ID) = [ID»(ixr,)]&(2m-1), i,…Nl其中, >>表示循环移位运算,S〉r,〉r, r,不是S的因子,ID为所述的定长二进制标识;r,、 r、 m、 i为整数。 11 or 16. A method of mapping and the identification of a key according to claim, wherein said calculation corresponding to the fixed-length binary identification mark row group, comprising: a row index is calculated according to the equation group Ci (ID), the expression of formula: Ci (ID) = [ID »(ixr,)] & (2m-1), i, ... Nl wherein the cyclic shift operation >>, S> r,> r, r, not S factor, ID of said fixed length binary identification; r ,, r, m, i is an integer.
17. 根据权利要求1或11所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有列标进行置换,包括:直接选取婆:据序列作为列标组,该数据序列为:0, 1,……,Nl,其中, N为密钥因子矩阵的列数。 17. The mapping method of claim 1 or 11 and a key identifier claim, wherein the replacement of all key factor matrix column index, comprising: directly select po: standard data sequence as the column group, the data sequence is: 0, 1, ......, Nl, wherein the number of columns N is a key factor matrix.
18. 根据权利要求1或11所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有列标进行置换,包括:将数据序列顺序存放、逆序存放或以随机的顺序存放在数组RU]中,该数据序列为:0, 1,……,Nl;其中i-0, 1,……,Nl; N为密钥因子矩阵的列数。 18. The mapping method of claim 1 or 11 and a key identifier claim, wherein all columns of the standard replacement key factor matrix, comprising: storing the data sequence order, storing or reverse random sequentially stored in an array RU], the data sequence is: 0, 1, ......, Nl; wherein i-0, 1, ......, Nl; number of columns N is a key factor matrix.
19. 根据权利要求18所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有列标进行置换,还包括步骤:步骤31,设置i-0;步骤32,判断ID mod ( Ni ) 〈Nil是否成立;步骤33,如果步骤32的判断结果为是,则将R[IDmod (Ni )]和R[Ni-1] 交换位置;如果步骤32的判断结果为否,则执行步骤34; 步骤34,设置ii + l,判断i是否等于N-2;步骤35,如果步骤34的判断结果为否,则重复步骤32至步骤35;如果步骤34 的判断结果为是,则置换结束,且经上述步骤处理后的数组R[i]存放的是(0…M-1)的一个置换。 19. The method of mapping the identifier 18 and key as claimed in claim wherein, said replacement of all keys factor matrix column index, further comprising the step of: step 31, set i-0; Step 32, Analyzing ID mod (Ni) <Nil holds; step 33, if the determination result in step 32 is YES, then R [IDmod (Ni)] and R [Ni-1] exchange sites; If the determination result in step 32 is NO , execute step 34; step 34, set ii + l, determines whether i is equal to N-2; step 35, if the decision result in step 34 is NO, then repeat step 32 to step 35; if the decision result in step 34 is YES , the end of the replacement, and by the array R [i] after the above process is stored in the step (0 ... M-1) is a permutation.
20. 根据权利要求18所述的标识和密钥的映射方法,其特征在于,所述对密钥因子矩阵的所有列标进行置换,还包括步骤:步骤41,设置i-0;步骤42'判断ID mod (Ni) ^0是否成立;步骤43,如果步骤42的判断结果为是,则将R[(IDraod (Ni ) )+i]和R[i] 交换位置;如果步骤42的判断结果为否,则执行步骤44; 步骤44,设置ii + l,判断i是否等于N-2;步骤45,如果步骤44的结果为否,则重复步骤42至步骤45;如果步骤44 的结果为是,则置换结束,且经上述步骤处理后的数组R[i]存放的是(0…M-1) 的一个置换。 20. The method of identifying and mapping key of claim 18, wherein all columns of the standard key factor matrix replacement, further comprising the step of: step 41, set i-0; step 42 ' Analyzing ID mod (Ni) ^ 0 holds; step 43, if the determination result of step 42 is YES, then R [(IDraod (Ni)) + i] and R [i] exchange location; if the judgment result of step 42 NO, step 44; step 44, set ii + l, determines whether i is equal to N-2; step 45, if the result of step 44 is NO, then repeat step 42 to step 45; if the result of step 44 is YES , the end of the replacement, and by the array R [i] after the above process is stored in the step (0 ... M-1) is a permutation.
21. 根据权利要求1或11所述的标识和密钥的映射方法,其特征在于,所述的步骤3包括:从密钥因子矩阵中选取与所述的行标组和列标组对应的密钥因子; 利用所述密钥因子计算与所述定长二进制标识对应的密钥。 21. The mapping method of claim 1 or 11 and a key identifier claim, wherein said step 3 comprises: selecting the corresponding row and column standard beacon group from the key factor matrix key factor; key using the long key corresponding to binary identification of said predetermined factor calculation.
22. 根据权利要求21所述的标识和密钥的映射方法,其特征在于,在离散对数密码系统中,利用密钥因子按照公式计算密钥;其中,按照公式<formula>formula see original document page 7</formula>计算私钥SU;按照公式PK^ gSK'。 22. The method of mapping the identifier 21 and key according to claim, wherein the discrete logarithm cryptosystem, a key factor is calculated according to the equation using a key; wherein, according to the formula <formula> formula see original document page 7 </ formula> private key calculating the SU; according to the equation PK ^ gSK '. m。 m. dp计算公钥PU;其中,P和g为离散对数密码系统的参数,P是素数,g是有限域Fp生成元, g小于P, Ri为行标,Ci为列标,S[Ri,Ci]为与标识对应的私钥因子。 dp calculated public key the PU; wherein, P and g is a discrete number of parameters cryptosystem, P is a prime number, g is a finite field Fp generator, g is less than P, Ri is row index, Ci is column index, S [Ri, CI] factor and the private key corresponding to the identifier.
23. 根据权利要求21所述的标识和密钥的映射方法,其特征在于,在椭圆曲线密码系统中,利用密钥因子按照公式计算密钥;其中,按照乂^式SK!。 23. The method according to the identification and mapping of keys according to claim 21, wherein, in the elliptic curve cryptosystem, using a key factor in accordance with the key formula; wherein, according to the formula ^ qe SK !. =艺5T《,C,] m。 Yi = 5T ", C,] m. dn计算私钥SU; 按照公式SK:rSU xG计算公钥PU;其中,n和G为椭圆曲线密码系统的参数,G是椭圓曲线E (Fp)上的基点, n是素数,n是基点G的阶,Ri为行标,G为列标,S [Ri, CJ为与标识对应的私钥因子。 dn private computing the SU; according to the formula SK: rSU xG calculating the PU public key; wherein, n and G is a parameter of the elliptic curve cryptosystem, G is a base point on the elliptic curve E (Fp), n is a prime number, n being the base point the order of G, Ri is row index, G is a column index, S [Ri, CJ identity with the corresponding private key factor.
24. 根据权利要求l或ll所述的标识和密钥的映射方法,其特征在于,采用哈希函数或消息鉴别码函数将所述非定长二进制标识转换为定长二进制标识。 24. The mapping method of claim l or ll and key identification claim, characterized in that, using a hash function or a message authentication code function of the non-fixed-length binary identification converted into fixed-length binary identification.
CN 200610115440 2006-08-09 2006-08-09 Mapping method for identification and key CN100589375C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610115440 CN100589375C (en) 2006-08-09 2006-08-09 Mapping method for identification and key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610115440 CN100589375C (en) 2006-08-09 2006-08-09 Mapping method for identification and key

Publications (2)

Publication Number Publication Date
CN1909445A CN1909445A (en) 2007-02-07
CN100589375C true CN100589375C (en) 2010-02-10

Family

ID=37700444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610115440 CN100589375C (en) 2006-08-09 2006-08-09 Mapping method for identification and key

Country Status (1)

Country Link
CN (1) CN100589375C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420300B (en) 2008-05-28 2013-05-29 北京易恒信认证科技有限公司 Double factor combined public key generating and authenticating method
CN105897405B (en) * 2016-06-02 2019-04-05 北京赛思信安技术股份有限公司 128 Symmetric key generations of one kind and protective device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5784463A (en) 1996-12-04 1998-07-21 V-One Corporation Token distribution, registration, and dynamic configuration of user entitlement for an application level security system and method
EP1326366A1 (en) 2000-01-21 2003-07-09 Victor Company Of Japan, Limited Cryptosystem-related method and apparatus
US6687375B1 (en) 1999-06-02 2004-02-03 International Business Machines Corporation Generating user-dependent keys and random numbers
CN1633071A (en) 2005-01-14 2005-06-29 南相浩 Method and apparatus for cipher key generation based on identification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5784463A (en) 1996-12-04 1998-07-21 V-One Corporation Token distribution, registration, and dynamic configuration of user entitlement for an application level security system and method
US6687375B1 (en) 1999-06-02 2004-02-03 International Business Machines Corporation Generating user-dependent keys and random numbers
EP1326366A1 (en) 2000-01-21 2003-07-09 Victor Company Of Japan, Limited Cryptosystem-related method and apparatus
CN1633071A (en) 2005-01-14 2005-06-29 南相浩 Method and apparatus for cipher key generation based on identification

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
An Identity Based Encryption system. Louise Owens, et al.Proceedings of the 3rd international symposium on Principles and practice of programming in Java. 2004
基于椭圆曲线密码系统的组合公钥技术. 唐文等.计算机工程与应用,第21期. 2003

Also Published As

Publication number Publication date
CN1909445A (en) 2007-02-07

Similar Documents

Publication Publication Date Title
Katz et al. Signature schemes with bounded leakage resilience
Kaliski PKCS# 7: Cryptographic message syntax version 1.5
Krawczyk et al. Hmac-based extract-and-expand key derivation function (hkdf)
Ballard et al. Achieving efficient conjunctive keyword searches over encrypted data
Cao et al. A pairing-free identity-based authenticated key agreement protocol with minimal message exchanges
EP1495573B1 (en) Hierarchical identity-based encryption and signature schemes
Jager et al. On the security of TLS-DHE in the standard model
Li et al. Oblivious signature-based envelope
Baek et al. Certificateless public key encryption without pairing
JP3872107B2 (en) Encryption key recovery system
Barsoum et al. Enabling dynamic data and indirect mutual trust for cloud computing storage systems
Orman The OAKLEY key determination protocol
US20090185677A1 (en) Short message encryption
JP4527358B2 (en) An authenticated individual cryptographic system that does not use key escrow
Gong et al. Two certificateless aggregate signatures from bilinear maps
Wang et al. Panda: Public auditing for shared data with efficient user revocation in the cloud
US8464058B1 (en) Password-based cryptographic method and apparatus
JP4547158B2 (en) Signature scheme using bilinear mapping
CN102017510B (en) Method and structure for self-sealed joint proof-of-knowledge and Diffie-Hellman key-exchange protocols
Gentry et al. Identity-based aggregate signatures
Seo et al. An efficient certificateless encryption for secure data sharing in public clouds
Delfs et al. Introduction to cryptography
Qin et al. Attribute-based encryption with efficient verifiable outsourced decryption
Mironov Hash functions: Theory, attacks, and applications
JPH08507619A (en) Two-way public key evidence and the key match for the low-cost terminal equipment

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
EXPY Termination of patent right or utility model