WO2008148275A1 - Method and system for encoding and decoding the digital message - Google Patents

Method and system for encoding and decoding the digital message Download PDF

Info

Publication number
WO2008148275A1
WO2008148275A1 PCT/CN2007/070264 CN2007070264W WO2008148275A1 WO 2008148275 A1 WO2008148275 A1 WO 2008148275A1 CN 2007070264 W CN2007070264 W CN 2007070264W WO 2008148275 A1 WO2008148275 A1 WO 2008148275A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
private key
public key
message
way function
Prior art date
Application number
PCT/CN2007/070264
Other languages
French (fr)
Chinese (zh)
Inventor
Haiming Guan
Original Assignee
Guan, Haiying
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 Guan, Haiying filed Critical Guan, Haiying
Publication of WO2008148275A1 publication Critical patent/WO2008148275A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • H04L9/3073Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves involving pairings, e.g. identity based encryption [IBE], bilinear mappings or bilinear pairings, e.g. Weil or Tate pairing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the present invention relates to the field of encoding and decoding of information, and more particularly to a public key cryptosystem for encrypting, decrypting, and signing and verifying data messages.
  • Cryptography is a science and technology that studies encryption and decryption transformation.
  • people refer to plain text as plaintext; incomprehensible text that transforms plaintext into ciphertext.
  • the process of transforming plaintext into ciphertext is called encryption; the reverse process, that is, the process of transforming ciphertext into plaintext is called decryption.
  • This encryption or decryption transformation is controlled by a key.
  • the cryptosystem used in an open environment should meet the following basic requirements:
  • Integrity Ensure that information is not arbitrarily or intentionally modified
  • Non-repudiation Prevent individuals or entities from denying the information they have published by destroying evidence to prove that something has happened.
  • Public key cryptography is a key technology to address the above-mentioned confidentiality, integrity, and non-repudiation.
  • the official birth of it is the "New Directions in Cryptography” by W. Diffie and M. Hellman in 1976 (W. Diffe, ME Hellman, "New direction in cryptography", IEEE Trans., 1976, 22, 644-654 ).
  • the public key cipher uses a public key and a private key.
  • the public key can be publicly delivered, but the associated private key is kept secret. Only by using a private key can decrypt the data encrypted with the public key and sign the data.
  • the role of the public key is to encrypt the information and verify the correctness of the signature.
  • NTRU public key cryptosystem J. Hoffstein, J. Pipher, and JH Silverman, "NTRU: a ring based public key cryptosystem", Crypto'96, LNCS 1423, pp. 267-288. Springer-Verlag, 1998.
  • its security is based on the mathematical problem of finding a very short vector in a large dimension lattice.
  • the second is the OTU2000 public key cryptosystem (T. Okamoto, K. Tanaka, and S. Uchiyama, "Quantum Public-Key Cryptosystems," CRYPTO2000, LNCS 1880, pp. 147-165, Springer-Verlag (2000).) Security is based on improved backpacking issues.
  • the third is the MQ public key cryptosystem, that is, the Multivariate Quadratic Polynomials in Public Key Cryptosystem. Its security is based on the incomprehensibility of the quadratic polynomial indefinite equations.
  • a typical solution in this area is the SPLASH signature algorithm (J. Patarin, L. Goubin, N. Courtois, "C*+- and HM: Variations around two schemes of T. Matsumoto and H. Imai", in Advances in Cryptology, Proceedings Of ASIACRYPT'98, LNCS 1514. Springer Verlag, 1998, pp.35-49. ), which is the digital signature algorithm recommended by the European cryptographic standard NESSIE (http://www.cryptonessie.org), mainly in special cards such as smart cards. Used in the field.
  • the prior art solution most similar to the present invention is the MQ public key cryptosystem.
  • the general form of the public key of the MQ public key cryptosystem is:
  • the public key of MQ is an indefinite system of equations, which is an irreversible function.
  • the encryption algorithm is too simple, that is, the mathematical structure of the quadratic polynomial function limits the size of the encryption algorithm. If the number of polynomials is "less than the number of arguments, or the combination is relatively simple, it is easy to be deciphered. If the number of polynomials is "more than the number of arguments, or a combination of complex Miscellaneous, engineering practical aspects such as key length, encoding and decoding speed, memory requirements, and transmission bandwidth all pose insurmountable technical problems. Due to this shortcoming, coupled with some simple MQ solutions being deciphered, people are suspected that MQ is not safe enough. There are many papers on MQ research, but they are rarely used, even if they become international standards (such as SPLASH signature algorithm). Rarely used.
  • the calculation for generating the signature is a one-to-one mapping, for example, from (b 1 ..., b ra ); and the calculation of the verification signature is not a one-to-one mapping, for example, only getting ( Cl , . From the signature M to the original complete signed data 1 ..., a m ), that is, cannot be used for encryption.
  • the present invention provides a method and apparatus for encoding and decoding digital messages that overcomes the shortcomings of current MQ techniques that can only be signed and not encrypted.
  • a method for digital signature is further disclosed, which may specifically include: selecting a positive integer w, n, n where w > w ⁇ w'; generating a public containing E'(x) Key, where E'W is a set of nonlinear mapping functions from ..., x m )m(y ..., JV) on the domain F; and, the E'W implicitly contains an interface function RO, which is used to get "about" based on :)
  • the private key includes R; sets a one-way function chain HO), and an inverse function of the one-way function chain ⁇ - uses the private key to first convert the message to be signed /' into an intermediate result, and then uses a one-way function
  • the inverse function of the chain ;-; and the private key converts the intermediate result ⁇ to the digital signature IV; and, by the one-way function chain HO) converts the digital signature w to the intermediate result X, and then uses the public key pair to the middle
  • X is decoded to obtain a decoding result, and the decoding result J and the message to be verified are compared, and it is determined whether the digital signature w is correct based on the comparison result.
  • a private key generating unit configured to generate a private key corresponding to the public key, where the private key includes R(x) ;
  • a one-way function chain determining unit for setting a one-way function chain HO) and an inverse function H of a one-way function chain
  • An encryption unit configured to convert the message w into an intermediate result X by a one-way function chain HO), and encode the intermediate result X by using the public key to obtain a coding result J;
  • the decryption unit is configured to convert the encoding result J into an intermediate result Z by using the private key, convert the intermediate result z into a decoding message w by using an inverse function H- 1 of the one-way function chain and a private key.
  • a system for digital signature including:
  • Xm R( ); where wi, ⁇ , is a positive integer, m > ⁇ n, ; a private key generation unit for generating a public key Corresponding private key, the private key includes R(x) ; a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H of the one-way function chain
  • a signature unit configured to convert the message to be signed/' into an intermediate result z by using the private key, using an inverse function H- 1 of the one-way function chain (and a private key to convert the intermediate result z into a digital signature IV; and verifying a unit for converting a digital signature w into an intermediate result X by a one-way function chain HO, decoding the intermediate result X with the public key, obtaining a decoding result ⁇ and comparing the decoding result J and waiting The verified message determines whether the digital signature w is correct based on the comparison result.
  • a system for encoding and decoding a digital message including at least:
  • Xm ) R(x); where m, n, r , r are positive integers, m >n>n'; a private key generating unit is configured to generate an identity with the authorized user whose identity is ⁇ Corresponding private key, the private key includes R;
  • a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H ⁇ of the one-way function chain, and at least one of an encryption/decryption unit and a signature verification unit, wherein
  • An encryption and decryption unit for using the public key, the one-way function chain HO) and the ID ( ⁇ ), for the message Encoding, obtaining the encoded message N; using the private key and the inverse function H-) of the one-way function chain to decode the encoded message N to obtain a decoded message;
  • the signature verification unit is configured to encode the message by using the private key and the inverse function H-) of the one-way function chain to obtain the encoded message N, and use the public key, the one-way function chain HO) and ⁇ , The encoded message N' is decoded to obtain a decoded message 7.
  • the present invention has the following advantages:
  • the encryption algorithm and the recoverable signature algorithm of the present invention are equivalent to a simultaneous replacement equations in which a part of the equation is a one-way function. Since the one-way function maps the bit string to the bit string in an almost random manner, the original algebraic relationship is completely destroyed, so that the mathematical transformation rule of the one-way function chain is equivalent to the dense polynomial group, and it needs to be fully expanded. Exponential storage space, in the process of solving the equation, will inevitably encounter the great difficulty of one-way function is difficult to expand.
  • the present invention further clarifies the security by alternately applying factorization (mainly for "multiplication”) and function decomposition (decomposition (mainly for “iteration”) to analyze hidden within the rational fractional indefinite equations.
  • factorization mainly for "multiplication
  • function decomposition decomposition (mainly for "iteration)
  • the difficulty of multi-level nested structure the combination of multiple simple functions into complex functions, so that the security of the password does not depend on a single variable, but depends on the multi-level chain relationship, thus achieving: directly set a complex representation Mathematical puzzles, but this puzzle is hard to prove equivalent to a mathematical problem known as a simple representation.
  • the innovative invention combines a one-way function into a function chain, and organically combines with an interface function and a public-private key, on the one hand, realizes the reversibility of the coding and decoding process (even if the number of arguments is greater than the number of polynomials), on the other hand.
  • the use of Gr0bner base and other methods to decipher will inevitably encounter the decomposition problem of dense polynomials.
  • the design of the one-way function chain overcomes the long-standing technical bias of understanding and using one-way functions: although a single one-way function is irreversible, several one-way functions are skillfully organized to form a mutual The restricted system-one-way function chain is reversible.
  • the traditional application of the one-way function mainly investigates its irreversibility and collision resistance, and the present invention further requires that it be provided with polynomials. Indicates the density of the time.
  • FIG. 1 is a flow chart of an embodiment of a method for encoding and decoding a digital message according to the present invention
  • FIG. 2 is a flow chart of an embodiment of a method for digital signature of the present invention
  • FIG. 3 is a schematic diagram of data flow direction according to an embodiment of the present invention.
  • Figure 4 is a schematic diagram showing the relationship between H(x), R(x) and H- of the present invention.
  • Figure 7 is a preferred embodiment of the present invention for encoding and decoding digital messages in an identity based manner.
  • FIG. 8 is a schematic diagram of jointly establishing a private key by multiple private key distribution centers of the present invention.
  • the invention belongs to the category of information security products and is mainly applied to network trust systems, such as documents, banks, mobile phones, internet, e-commerce, e-government, logistics, network monitoring, power control, fund transfer, transactions, data encryption and the like.
  • Password Generally understood as an algorithm for information encryption and decryption transformation. Its basic purpose is to disguise information so that outsiders cannot understand the true meaning of the information, and insiders can understand the original meaning of the disguised information.
  • Public key cryptosystem The public key cryptosystem uses two keys—a public key (referred to as: public key) and a private key (referred to as: private key).
  • the public and private keys are mathematically related, but it is difficult to calculate the private key from the public key.
  • the public key can be publicly transmitted between the communicating parties, or it can be publicly published as a telephone number, and the private key is kept in secret by the authorized user.
  • anyone can find its public key from the name of a user, so it can send an encrypted message to this user. Only authorized users can use their private key to complete the decryption.
  • the public key cryptosystem also provides the ability to digitally sign and authenticate: an authorized user can sign the information with his private key (equivalent to the process of decrypting with the private key described above); other users cannot sign because they do not have the private key.
  • the user's public key can be used to verify the correctness of the signature (equivalent to the above process of encrypting with the public key).
  • digital signature algorithms Recoverable digital signature scheme: The signed data can be derived from the signature; Unrecoverable digital signature scheme: The signed data cannot be derived from the signature.
  • Finite field It is a concrete and visual mathematical structure that can be understood in a colloquial manner as a collection of finite elements that can be added, subtracted, multiplied, and divided. (usually denoted as F, when the number of elements in the finite field is prime;?, denote F.)
  • the polynomial set on F, the polynomial four is the domain, called the polynomial extension of F. If the number of terms in a polynomial is relatively small, it is called a sparse polynomial; otherwise it is called a dense polynomial. Dense polynomials not only have a high number of times, but the number of items is very large, and it is expanded to indicate that it takes a lot of space.
  • Rational fraction on a finite field It can be understood as dividing two polynomials:
  • This function is called one-way function, also called hash function, hash function, Hash functions, etc., have been widely used in data integrity testing and information authentication. It converts an arbitrary length of data X into a fixed-length or fixed-number field or a string _y.
  • One-way function algorithms are well known in the art.
  • the most popular one-way function algorithms are MD5 and SHA-1 (Federal Information Processing Standard FIPS 180-1); stronger one-way function algorithms are SHA-256, SHA-384 and SHA-512 (US Federation) Information Processing Standard FIPS 180-2).
  • the domain F specified in the present invention may adopt a finite field F in which the number of elements is a prime number; but is not limited to this and can be extended to various domains.
  • F is a finite field
  • the power operations of functions or arguments, including integer power operations and fractional power operations can be converted into expanded, simplified, and organized A rational representation of the fraction.
  • the encoded message described in the present invention may be generated by a user of a location and transmitted to another location and then decoded by the user of the other location, i.e., the coded decoding may not be co-located.
  • the coded decoding may not be co-located.
  • encoding and decoding at the same location is a simpler case.
  • FIG. 1 there is shown a flow chart of an embodiment of a method for encoding and decoding a digital message according to the present invention, which may specifically include the following steps:
  • Step 101 Select a positive integer w, n, where m>n;
  • Step 102 Generate a public key including E(x), where E(x) is a slave in domain F
  • Step 103 Generate a private key corresponding to the public key, where the private key includes R;
  • Step 104 setting a one-way function chain HO), and an inverse function of the one-way function chain H- 1 ⁇ ;
  • Step 105 Convert the message w into an intermediate result X through a one-way function chain HO), and then encode the intermediate result X by using the public key to obtain a coding result and
  • Step 106 Convert the encoding result into an intermediate result z by using the private key, and then convert the intermediate result z into the decoding message w by using the inverse function H- 1 ⁇ ) of the one-way function chain and the private key.
  • step 105 is mainly applied to the case of encryption
  • step 106 is mainly applied to the case of decryption.
  • the parameters are different, and the performance of the compiled code is also good or bad. A more preferred embodiment will be described later in the specification.
  • Step 201 Select a positive integer w, n, n where w > w ⁇ w, ;
  • Step 202 Generate a public key including E'(x), where ⁇ ' is a non-linear mapping function group of x m )m (y.. on the domain F; and, the E'W
  • Step 203 Generate a private key corresponding to the public key, where the private key includes R;
  • Step 204 setting a one-way function chain HO), and an inverse function of the one-way function chain H- 1 ⁇ ;
  • Step 205 using the private key to first convert the message to be signed /' into an intermediate result z, and then using the inverse function H- 1 of the one-way function chain (and the private key to convert the intermediate result z into a digital signature IV;
  • Step 206 Convert the digital signature iv into an intermediate result x through a one-way function chain HO), and then decode the intermediate result X by using the public key to obtain a decoding result.
  • Step 207 Compare the decoding result with the message to be verified, and determine whether the digital signature w is correct according to the comparison result.
  • step 205 is mainly applied to the case of signing a message
  • steps 206 and 207 are mainly applied to the case of verifying a signature.
  • a public key corresponds mathematically to the transformation rules of a given input and output message, and only one private key; of course, this private key can take different representations.
  • Fig. 3 there is shown a data flow diagram of an embodiment of the present invention, including data processing procedures such as encryption and decryption and digital signature.
  • the decoded message is compared with all the data of the original message to determine whether it belongs to the correct signature; and for the unrecoverable signature (ie, the case of "> «' in the specification), it is decoded.
  • the message is compared to a portion of the original message to determine if it is the correct signature.
  • a one-way function chain has the following two properties:
  • the interface function is mainly used to get "a function about:” according to :), which is generally expressed as: u 0 (x) R(x);
  • R(x) including the functional form of i3 ⁇ 4, M Q2 , and the value of the coefficient e 3 are all secret information that the unauthorized user should not know.
  • those skilled in the art can design a variety of modes according to the characteristics of R(x), which cannot be detailed here.
  • the present embodiment can obtain the public key and the private key by the following steps:
  • the function may include various function types such as a polynomial, a rational fraction, and the like, and the present invention does not need to be limited thereto.
  • the purpose of synthesizing the " ⁇ ), T, and G is to embed and hide information about R, T, and G in the public key, all of which belong to secret information that the unauthorised user should not know.
  • factorization mainly for "multiplication
  • function decomposition decomposition (mainly for "iteration)
  • Step d select "' function as E'(x) in E(x), get the public key;
  • E'(x) contains a function about (i, ..., );
  • E'( ) (Ei( i, ..., x m ), ..., E w i, ..., x m )); disclose the public key to all users;
  • the embodiment can be used for various situations such as encryption and decryption and digital signature.
  • the present embodiment can be used in the case of digital signature.
  • Ho step g generating inverse function T T- 1; generating an inverse function of G G- 1; T a. 1 and G- 1 calculated the DO; generating a private key, the private key R and comprising D0, the key that Send it to authorized users for secret storage.
  • R(x) in the private key is used for the inverse function H- 1 of the one-way function chain (together the intermediate result z into a decoded message w.
  • step e The preset rules described in the foregoing step e may be set by a person skilled in the art according to actual conditions.
  • the preset rule may be in the following two cases:
  • the denominator polynomial of each rational fraction is the same; when the last is a nonlinear transformation, the denominator polynomial of each rational fraction in the public key is usually different.
  • the default denominator can save public key storage space (as long as "+1, not 2" polynomial is stored), increase the speed of the operation (as long as the value of "+1, not 2" polynomial is calculated ).
  • the present invention also provides two device embodiments:
  • a private key generating unit configured to generate a private key corresponding to the public key, the private key including R(x) ;
  • a one-way function chain determining unit configured to set a one-way function chain HO), and a one-way The inverse function of the function chain H—
  • An encryption unit configured to convert the message w into an intermediate result X by a one-way function chain HO), and then encode the intermediate result X by using the public key to obtain a coding result and
  • a decryption unit configured to convert the encoding result J into an intermediate result Z by using the private key, and then convert the intermediate result z into a decoding message w by using an inverse function H— ⁇ ) of the one-way function chain and a private key.
  • a system embodiment for digital signature specifically includes:
  • a private key generating unit configured to generate a private key corresponding to the public key, the private key including R(x) ;
  • a one-way function chain determining unit configured to set a one-way function chain HO), and a one-way The inverse function of the function chain H—
  • a signature unit configured to use the private key to first convert the message to be signed/' into an intermediate result z, and then use an inverse function of the one-way function chain ;-; and the private key to convert the intermediate result to a digital signature IV; as well as
  • a verification unit configured to convert the digital signature w into an intermediate result X by a one-way function chain HO), and then use the public key to decode the intermediate result X to obtain a decoding result ⁇ Comparing the decoding result and the message to be verified, it is determined whether the digital signature W is correct according to the comparison result.
  • the method of establishing a one-way function chain is not limited to the following methods, but can be generalized to various methods that satisfy the function of the one-way function chain.
  • the invention has been described by way of a preferred embodiment.
  • the first step is to build a one-way function chain.
  • the inversion of a one-way function that is, it is difficult to find its input by its output.
  • mapping from IV to X is a complex dense polynomial function, it is very difficult to expand and simplify it, but it is easy to invert it, that is, it is easy to find IV by X.
  • the specific practice of this embodiment is:
  • ⁇ ( ⁇ ) is set as a loop from 1 to ⁇ .
  • HO) and H- 1 ⁇ are publicly released as cryptographic algorithms, and the algorithm parameters (for example, :) of R(x) are distributed as part of the private key to the authorized user for secret preservation. Calculating ⁇ 1 ⁇ requires these parameters.
  • the functional form of the ⁇ , ..., x ra :) contained in the ⁇ ' may be a polynomial, and preferably, may be a combination of a polynomial and a rational fraction, or all of the rational fractions.
  • the first step is to build a one-way function chain HO)
  • F be a finite field F> /? Is a prime number, a positive integer "' and w>"'. Assume ...., z n ), ⁇ , x,, j ⁇ eF.
  • the second step establish password parameters T, G
  • T (T 1; ..., T i+1 ), where:
  • each inverse transformation IV 1 is derived from "F on F, ..., ⁇ ⁇
  • the ⁇ -ary linear polynomial consists of:
  • the inverse function G- 1 of G is derived, which is the inverse of the above-mentioned inverse transformation of the elementary reversible nonlinear transformation, where each inverse transformation is composed of "F on, F, ..., ⁇ ⁇ Function composition:
  • G- 1 (G 1 - 1 , ..., ⁇ 1 ), where:
  • the third step is to synthesize the function group « « « ⁇ , T, G into E(x), and establish a public key ⁇ '
  • the fourth step, put! 11 , G- 1 is synthesized as DO), and the private key ⁇ DO, R(x) ⁇ is established.
  • the DO can take a variety of function representations: it can be represented by a function or a simplification, or it can be used directly! 11 , G- 1 to indicate that it can also be represented by other functional forms;
  • Step 5 encrypt and decrypt, digitally sign and verify
  • the present invention can only realize the signature of the unrecoverable data, and the encryption cannot be implemented.
  • the method is as follows: When the private key ⁇ DO , R ⁇ is used to generate a digital signature, the data;, is converted into a digital signature IV, and the calculation method is: w );
  • the preferred method for establishing G is: pre-establishing a large enough function library; later, when needed, randomly extracting a number of simple functions from the library and combining them into complex encryption and decryption functions according to certain rules.
  • the preferred method of building a function library is to select several different types of polynomial functions or rational fractional functions whose number of independent variables does not exceed ", and is reversible for its last independent variable, according to its The number of variables is divided into "classes"
  • G, G m ⁇ i ⁇ not the number of its independent variables is ⁇ and for it;
  • the function scale of the corresponding decryption function vector G 1 of the i-th layer has exploded:
  • Vin Gin ⁇ n) (1 ⁇ 41, ⁇ , U in )
  • HO belongs to the public cryptographic algorithm, hidden in the function group E, and it is difficult to separate R(x) and T, G from E(x);
  • G- 1 is used to establish D0, and the ciphertext is obtained by DO to obtain the intermediate result z, that is, the value of the function group " ⁇ when encrypting:
  • R (including function form and coefficients) are part of the private key and will be kept secret by the authorized user.
  • Vll ( «111 UQI + «112 ⁇ 02 + ⁇ ll) mod p
  • Vl2 ( «121 «01 + «122 ⁇ 02 + b U ) mod p
  • V 2 1 («211 «11 + «212 ⁇ 12 + 3 ⁇ 4l) mod pm.
  • Dp 22 ( «22i «ii + a 222 u u + b 22 ) mod p
  • PKI Public Key Infrastructure
  • PKI construction has faced major challenges, highlighted by the sharp increase in management costs.
  • One of the main reasons is that the current public key cryptosystem is difficult to adapt to the complex use environment of ultra-large-scale networks.
  • the present invention proposes a basic countermeasure for a public key cryptography to cope with the challenge of building a network trust system: an identity-based public key cryptography system.
  • identity-based means that the content of the public key is the user's identity mark ID - some combination of information such as name, phone, email, etc., with the information itself, you can directly determine who the public key belongs to. Instead of using a public key certificate like PKI, bind the user's ID to the user's public key. The essence of this technology point is that "all users share a public key”.
  • the realization of "identity-based” brings the benefits of public key management in the network environment: first, the economic benefits are significant; second, the user capacity is huge; third, the integrated management of public key data and user identification is realized.
  • FIG. 7 an embodiment of a method for encoding and decoding digital messages is shown, and Figure 7 shows a flow chart of the steps.
  • This embodiment adopts an identity-based technology point, and specifically includes:
  • Step 701 Select a positive integer w, n, n r, where m > n ⁇ n, ;
  • ID is the identity of the authorized user; and, in the E'(x, ID), the interface function R(x) is implicitly included, which is used to obtain "one (Xi, ..., ) according to (1)
  • the function: 0 (x) ( oi(x U ..., X m ), ...-,
  • Step 703 Generate, according to an authorized user whose identity is ⁇ , a private key corresponding to the identity, where the private key includes R;
  • Step 704 setting a one-way function chain HO), and an inverse function of the one-way function chain H- 1 ⁇ ;
  • Step 705 Using the public key, the one-way function chain HO) and the ID ( ⁇ ), encoding the message to obtain the encoded message N; using the private key and the inverse function H-) of the one-way function chain Encoding the message N to decode, to obtain a decoded message;
  • step 706 using the private key and the inverse function H of the one-way function chain to encode the message M, obtaining the encoded message using the public key, the one-way function chain HO), and the ID ( ⁇ ), Correct The encoded message N' is decoded to obtain a decoded message 7.
  • the public key and the private key can be obtained by the following steps:
  • m>n r; and in the case of > « ⁇ «', it can be used for various digital signatures.
  • the present embodiment may also obtain the public key and the private key in other preferred steps, which will be described in detail in the following specific embodiments.
  • ID (ID 1 ..., ID, r is a positive integer, ID ⁇ F;
  • ID ⁇ F the coefficient in the public key ⁇ ' ⁇ is defined as the mapping function of the ID.
  • the first step is to define the password parameters T and G as functions of ID.
  • At least one of the coefficients of T and / or G is a mapping function of the ID.
  • Gp at least one coefficient of any one or more of T is ID a mapping function; and/or a mapping function in which at least one coefficient of any one or more of G is an ID.
  • at least one coefficient in the last layer is a mapping function of the ID; and/or at least one coefficient in the last layer is a mapping function of the ID.
  • the authorized user's identity ID (ID 1 ..., i ), r be a positive integer, ID ⁇ F;
  • the coefficient of the function in T, G is specified by the private key distribution center as the mapping function of the ID , so that T, G become a function of ID;
  • E'(x, ID) Limiting the size of the function of the public key E'(x, ID). For example, E'(x, ID) is just a function of ID ⁇ ID. On the contrary, if you put it! The coefficient in ⁇ is defined as a function of ID. After the nonlinear transformation, the number of IDs increases, making the function size of the public key too large, reducing the practicability.
  • the second step is to synthesize 1 ⁇ G into E(x, ID) and establish the public key E'(x, ID)
  • E'(x, ID) is publicly released as a public key shared by all users
  • the third step put! ⁇ 1, G- 1 synthesized as D0, the establishment of each user's private key ⁇ DO, R ⁇ private key distribution center to an authorized user ID code parameter substituting TG 1, the synthesis TG- 1 to D0, then ⁇ DO, R(x) ⁇ is sent as a private key to the authorized user for secret storage;
  • ⁇ 2 ⁇ 2 ( ⁇ , 2, ⁇ 3, ID)
  • the present invention also provides an apparatus embodiment, which includes at least the following units:
  • a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H ⁇ of the one-way function chain, and at least one of an encryption/decryption unit and a signature verification unit, wherein
  • An encryption and decryption unit configured to encode the message by using the public key, the one-way function chain HO) and the ID ( ⁇ ), to obtain an encoded message N; using the private function and the inverse function of the one-way function chain H—) Decoding the encoded message N to obtain a decoded message;
  • the signature verification unit is configured to encode the message by using the private key and the inverse function H-) of the one-way function chain to obtain the encoded message N, and use the public key, the one-way function chain HO) and ⁇ ,
  • the encoded message N' is decoded to obtain a decoded message 7.
  • G 'jOO ⁇ ⁇ jOl 1 ⁇ ... ⁇ l jn v jn tjkh tj0l ⁇ Y p , jk, V jk ⁇ p (Xx, ..., X m ), k 1, and then G ' is derived.
  • o G ⁇ is:
  • the coefficient ⁇ in the above encryption process is specified as the mapping function of the ID, the number of decryption process IDs is n times the number of IDs in the encryption process, and the number of times remains unchanged.
  • the original message may be converted into an intermediate result message M by using a one-way function chain (HO), and the message is encoded by using the public key and ID ( ⁇ ) to obtain an encoded message N;
  • the private key decodes the encoded message N to obtain a decoded message, and converts the intermediate result message into a final decoding result by using an inverse function H- ⁇ of the one-way function chain;
  • signature it may be: using the private key to encode the message, obtaining an intermediate result z, transforming the intermediate result z into a digital signature message N through the inverse function H of the one-way function chain, and, through a one-way function
  • the chain HO converts the digital signature message N' into an intermediate result X, and uses the public key and ID ( ⁇ ) to decode the intermediate result X to obtain a decoded message 7.
  • Ho sub-step a obtained from the calculation of T 1 and G-1 D0, and, associated with said DO ID;
  • ho sub-step B the D0 is divided into at least two parts, at least two private key stored in the distribution center , each part is related to the ID;
  • each private key distribution center substitutes the authorized user identifier ⁇ into the part DO that is secretly saved, calculates a part of the private key, and sends it to the user;
  • Sub-step d the user synthesizes the private key of each part, and calculates the private key.
  • FIG. 8 it is a schematic diagram of a plurality of private key distribution centers of the present invention jointly establishing a private key.
  • An example of the above process is described mathematically as follows:
  • a unique primary key distribution center in the network ⁇ ( ⁇ establishes the public key E'(x, ID) and establishes a private key generation function corresponding to E'(x, ID):
  • O (2) (y, A 2 , B 2 ) two denominator polynomials in O(y, A 2 , ⁇ 2 ).
  • KDCn sends the above D (1 3 ⁇ 4, ⁇ 2 , ⁇ 2 ) to KDC 21 , D( 2 3 ⁇ 4 , ⁇ 2 , ⁇ 2 ) to KDC 22 , and maps ID to 4, 4, ...
  • the functions are also sent to them.
  • KDC 21 and KDC 22 respectively substitute the ID of the user into the mapping function, and calculate "211, «212, «221, «222, ⁇ 1, 1 ⁇ 2, and then substitute them respectively. :
  • Authorized users receive D (1) 0 and D (2) 0 from KDC 21 and KDC 22 respectively, and then restore to DO according to the specified method.
  • each KDC 2 is not restricted by the management system and computing power, but is unable to steal the user's private key due to lack of information; and the KDCu that grasps all the secrets is usually in the closed storage state and does not directly participate in the establishment.
  • Private key It is recommended that KDCu establish a private key generation function, Renaming variables (such as ll, «212, «221, «222, ⁇ 1, 2) can achieve better results.
  • the embodiment may further include the following steps: In the process of generating the private key, the random transform w() and the inverse w-) are inserted.
  • the specific implementation method of W(), W ⁇ ) is a well-known technique.
  • the basic idea of personalization of the private key form is to insert a random transformation in the process of deriving the DO to cover the correlation between DO and ID, and hide R; thus:
  • D0 of different users Not only is its mathematical nature different, but its function expression is also subject to two independent factors, one from ID and random transformation, which effectively improves the ability to resist collusion.
  • a random linear transformation W 2 0, W ⁇ O is inserted between IV 1 , and the specific steps are as follows:
  • the first step is to calculate:
  • the second step is to calculate in order:
  • VI2 D V I 2 (M'II, is, ii), which is a 9-order 2-order rational fraction;
  • I3 D V I 3 (M'II, ... is, vii, v l2 ), which is a 10 yuan 2 rational fraction;
  • I4 D V I 4 (M'II, ... 18, Vll, Vl2, is), which is a 11-order 2-order rational fraction;
  • VI5 D V I 5 (M'II, i8, vn, ..., v l4 ), which is a 12-member 2-order rational fraction;
  • I6 D V I 6 (M'II, i8, vn, ..., i 5 ), which is a 13-order 2-order rational fraction;
  • VI 7 D V I 7 (3 ⁇ 4'II, i8, vn, ..., v l6 ), which is a 14-member 2-order rational fraction;
  • I 8 D V I 8 (M'II, i8, vn, ..., v l7 ), which is a 15 yuan secondary rational fraction;
  • the above; ii the argument of the substitution when deriving the formula; the value substituted in the decryption calculation.
  • the third step is to calculate:
  • the fourth step is to calculate in order:
  • z 6 is hidden as a set of intermediate results in the calculation process of the fourth , which can be understood as the parameter of R(x) in the private key is also hidden in the personalized private key, for the authorized user Confidential.
  • each secondary private key distribution center should use the same W), ⁇ ".
  • the number of elements of the solution set of the indefinite equations ⁇ ' ⁇ , ..., jv) is approximately, which should be greater than 2 64 .
  • the derivation process of establishing D0 can be divided into several segments:
  • G 2 uses the "non-linear transformation whose nonlinear number remains constant" as described above:
  • G 2 - 1 gy coefficients the coefficient to be understood as the G 2 1 ⁇ 2 (), ..., 88 8 linear function; G 2 is disposed linear function ID, then G 2 - 1 It is the 8th function of the ID.
  • the ID mapping method is used to establish an identity-based working mode, so that all users of the entire network share a public key, which brings great convenience to the public key management in the network environment;
  • the method of "multiple private key distribution center synthesis private key” and “private key form personalization” improves the anti-collusion attack ability of the cryptosystem.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)

Abstract

A method and system for encoding and decoding the digital message are provided. The method includes: a public key containing E(x) is generated, wherein, E(x) is the set of non-linearly mapping function from x to y on domain F; and, the E(x) contains interface function R(x) implicitly, which is used to obtain n m-variable functions; a private key containing R(x), one way function chain H(w)and its inverse function H-1(z) are generated; corresponding encryption/decryption process or signature authentication process is completed using H(w), thepublic key, and the private key. The conversion of plaintext and ciphertext, signature and data is equaled to its part of equations are the simultaneous permutation equation set of one way function. Due to the one way function maps the bit string to the bit string in the manner of almost random, the origin algebra relation is destroyed, the mathematics conversion rule of one way function equals to dense polynomial set, expanding it completely needs index level store space, anti-decoding is improved greatly.

Description

一种用于编码和译码数字消息的方法和系统  Method and system for encoding and decoding digital messages
本申请要求于 2007 年 6 月 7 日提交中国专利局、 申请号为 200710100306.4、 发明名称为"一种用于编码和译码数字消息的方法和系统"的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。  The present application claims priority to Chinese Patent Application No. 200710100306.4, entitled "A Method and System for Encoding and Decoding Digital Messages", filed on June 7, 2007, the entire contents of which is incorporated herein by reference. This is incorporated herein by reference.
技术领域 本发明涉及信息的编码和译码领域,特别是涉及一种对数据消息加密、解 密以及签名、 验证的公用密钥密码体制。 TECHNICAL FIELD The present invention relates to the field of encoding and decoding of information, and more particularly to a public key cryptosystem for encrypting, decrypting, and signing and verifying data messages.
背景技术 Background technique
密码技术是研究加密和解密变换的一门科学技术。通常情况下, 人们将可 懂的文本称为明文; 将明文变换成的不可懂的文本称为密文。把明文变换成密 文的过程叫加密; 其逆过程, 即把密文变换成明文的过程叫解密。这种加密或 解密变换是由密钥来控制的。在开放环境下使用的密码系统应满足以下基本要 求:  Cryptography is a science and technology that studies encryption and decryption transformation. Usually, people refer to plain text as plaintext; incomprehensible text that transforms plaintext into ciphertext. The process of transforming plaintext into ciphertext is called encryption; the reverse process, that is, the process of transforming ciphertext into plaintext is called decryption. This encryption or decryption transformation is controlled by a key. The cryptosystem used in an open environment should meet the following basic requirements:
保密性: 保证信息不被泄漏给非授权的用户;  Confidentiality: Ensure that information is not leaked to unauthorized users;
完整性: 保证信息不被任意或蓄意地修改;  Integrity: Ensure that information is not arbitrarily or intentionally modified;
抗抵赖性: 防止个人或实体通过销毁证据来否认曾经发布过的信息, 以证 明某类事件确实曾经发生过。  Non-repudiation: Prevent individuals or entities from denying the information they have published by destroying evidence to prove that something has happened.
公钥密码是解决上述的保密性、 完整性、 抗抵赖性的关键技术。其正式诞 生的标志是 1976年 W.Diffie和 M.Hellman发表的《密码学的新方向》(W. Diffe, M. E. Hellman, "New direction in cryptography", IEEE Trans., 1976, 22, 644-654)。公 钥密码使用一个公钥和一个私钥,公钥可以公开传递,但相关的私钥是保密的。 只有使用私钥才能解密用公钥加密的数据、并对数据进行签名, 公钥的作用则 是对信息进行加密、 以及验证签名的正确性。  Public key cryptography is a key technology to address the above-mentioned confidentiality, integrity, and non-repudiation. The official birth of it is the "New Directions in Cryptography" by W. Diffie and M. Hellman in 1976 (W. Diffe, ME Hellman, "New direction in cryptography", IEEE Trans., 1976, 22, 644-654 ). The public key cipher uses a public key and a private key. The public key can be publicly delivered, but the associated private key is kept secret. Only by using a private key can decrypt the data encrypted with the public key and sign the data. The role of the public key is to encrypt the information and verify the correctness of the signature.
当前公钥密码面临的一个重要挑战, 是量子计算的挑战。 由 Shor在 1994 年发明的 Shor算法 (P. W. Shor, "Algorithms for quantum computation: Discrete log and factoring", Proceedings of the 35th Symposium on Foundations of Computer Science, 1994, pp.124-134. ) , 能以多项式时间攻破所有的能够转换成 广义离散傅立叶变换的公钥密码, 包括目前广泛使用的 RSA、 DH和 ECC等 三种公钥密码体制。 公钥密码应对量子计算挑战的基本对策是:采用不能转换成离散傅立叶变 换的数学难题来建立公钥密码体制。按照这种思路, 当前国际上主要有三类互 相竞争的 "抗量子计算" 的公钥密码方案, δ卩: An important challenge facing current public key cryptography is the challenge of quantum computing. The Shor algorithm invented by Shor in 1994 (PW Shor, "Algorithms for quantum computation: Discrete log and factoring", Proceedings of the 35th Symposium on Foundations of Computer Science, 1994, pp. 124-134.), can be polynomial time It breaks all public key ciphers that can be converted into generalized discrete Fourier transforms, including three widely used public key cryptosystems such as RSA, DH and ECC. The basic strategy for public key cryptography to cope with quantum computing challenges is to establish a public key cryptosystem using mathematical problems that cannot be transformed into discrete Fourier transforms. According to this line of thinking, there are currently three types of competing "anti-quantum computing" public key cryptosystems in the world, δ卩:
一是 NTRU公钥密码体制 (J. Hoffstein, J. Pipher, and J. H. Silverman, "NTRU: a ring based public key cryptosystem", Crypto'96, LNCS 1423, pp.267-288. Springer- Verlag, 1998. ), 其安全性基于在一个大维数的格中寻找一 个很短向量的数学难题。  One is the NTRU public key cryptosystem (J. Hoffstein, J. Pipher, and JH Silverman, "NTRU: a ring based public key cryptosystem", Crypto'96, LNCS 1423, pp. 267-288. Springer-Verlag, 1998. ), its security is based on the mathematical problem of finding a very short vector in a large dimension lattice.
二是 OTU2000公钥密码体制 (T. Okamoto, K. Tanaka, and S. Uchiyama, "Quantum Public-Key Cryptosystems," CRYPTO2000, LNCS 1880, pp.147-165, Springer- Verlag (2000). ) , 其安全性基于改进的背包问题。  The second is the OTU2000 public key cryptosystem (T. Okamoto, K. Tanaka, and S. Uchiyama, "Quantum Public-Key Cryptosystems," CRYPTO2000, LNCS 1880, pp. 147-165, Springer-Verlag (2000).) Security is based on improved backpacking issues.
三是 MQ公钥密码体制,即多变元二次多项式公钥密码体制(Multivariate Quadratic Polynomials in Public Key Cryptosystem) , 其安全性基于二次多项式 不定方程组的难解性。这个领域典型的方案是 SPLASH签名算法 (J. Patarin, L. Goubin, N. Courtois, "C*+- and HM: Variations around two schemes of T. Matsumoto and H. Imai", in Advances in Cryptology, Proceedings of ASIACRYPT'98, LNCS 1514. Springer Verlag, 1998, pp.35-49. ), 该方案是欧洲 密码标准 NESSIE推荐的数字签名算法 (http://www.cryptonessie.org), 主要在 智能卡等特殊的领域中使用。  The third is the MQ public key cryptosystem, that is, the Multivariate Quadratic Polynomials in Public Key Cryptosystem. Its security is based on the incomprehensibility of the quadratic polynomial indefinite equations. A typical solution in this area is the SPLASH signature algorithm (J. Patarin, L. Goubin, N. Courtois, "C*+- and HM: Variations around two schemes of T. Matsumoto and H. Imai", in Advances in Cryptology, Proceedings Of ASIACRYPT'98, LNCS 1514. Springer Verlag, 1998, pp.35-49. ), which is the digital signature algorithm recommended by the European cryptographic standard NESSIE (http://www.cryptonessie.org), mainly in special cards such as smart cards. Used in the field.
与本发明最近似的现有技术的解决方案是 MQ公钥密码体制。 MQ公钥密 码体制的公钥的一般形式为:  The prior art solution most similar to the present invention is the MQ public key cryptosystem. The general form of the public key of the MQ public key cryptosystem is:
m  m
1< j≤k≤m 7=1
Figure imgf000004_0001
1< j≤k≤m 7=1
Figure imgf000004_0001
其中, F为规定的域。 由于/ w〉《, 故 MQ的公钥为不定方程组, 属于不可 逆函数。一般把公钥的逆函数规定为是与它相对应的私钥, 即从 ^ = (^, . . . , 3^1 Χ = (ΧΙ , ..., )的可逆变换。  Where F is the specified domain. Since /w>", the public key of MQ is an indefinite system of equations, which is an irreversible function. The inverse function of the public key is generally defined as the private key corresponding to it, that is, the reversible transformation from ^ = (^, . . . , 3^1 Χ = (ΧΙ , ..., ).
但是, 上述现有技术中 MQ公钥密码体制存在以下缺点:  However, the above-mentioned prior art MQ public key cryptosystem has the following disadvantages:
1、 加密算法过于简单, 即二次多项式函数的数学结构限制了加密算法的 规模。 如果多项式的数量《与变元的数量 比较少, 或者组合比较简单, 则 易于被破译。 如果多项式的数量《与变元的数量 比较多, 或者组合比较复 杂, 则密钥长度、 编码和译码速度、存储器需求以及传输带宽等工程实用方面 都会带来难以克服的技术问题。由于这个缺点,再加上一些简单的 MQ方案被 破译, 使人们怀疑 MQ的安全性不够, 目前研究 MQ的论文很多, 但真正使 用的很少, 即使成为国际标准 (例如 SPLASH签名算法), 也很少被使用。 1. The encryption algorithm is too simple, that is, the mathematical structure of the quadratic polynomial function limits the size of the encryption algorithm. If the number of polynomials is "less than the number of arguments, or the combination is relatively simple, it is easy to be deciphered. If the number of polynomials is "more than the number of arguments, or a combination of complex Miscellaneous, engineering practical aspects such as key length, encoding and decoding speed, memory requirements, and transmission bandwidth all pose insurmountable technical problems. Due to this shortcoming, coupled with some simple MQ solutions being deciphered, people are suspected that MQ is not safe enough. There are many papers on MQ research, but they are rarely used, even if they become international standards (such as SPLASH signature algorithm). Rarely used.
2、 只能签名、 不能加密。 其原因是: 它的公钥 (即加密算法) 为不定方 程组, 而不定方程组的解是一个很大的集合, 只能用于不可恢复的数字签名算 法, 不能从签名中还原出被签名的数据。 具体而言:  2, can only sign, can not be encrypted. The reason is: Its public key (that is, the encryption algorithm) is an indefinite system of equations, and the solution of the indefinite system of equations is a large set, which can only be used for the unrecoverable digital signature algorithm, and cannot be restored from the signature. The data. in particular:
MQ产生签名的方法为: 把待签名的数据 fl = ( l, ..., :), 代入私钥, 进 行求值运算, 得到签名 6 = The method for generating a signature by MQ is: Substituting the data to be signed fl = ( l , ..., :) into the private key, performing an evaluation operation to obtain a signature 6 =
MQ验证签名的方法为: 设被签名的数据为 fl = (au am), 把待验证的 签名 6代入公钥,计算出 如果 (d, ..., Α, ...,Ο,则接受签名, 否则拒绝签名。 The method for verifying the signature of MQ is as follows: Let the signed data be fl = (a u a m ), substitute the signature 6 to be verified into the public key, and calculate if (d, ..., Α, ..., Ο, Accept the signature, otherwise reject the signature.
由于产生签名的计算是一一映射, 例如, 从 到 (b 1 ..., bra); 而 验证签名的计算并不是一一映射, 例如, 只得到 (Cl, . 也就是说, 不可 能从签名 M导到原始的完整的被签名数据 1 ...,am), 即不能用于加密。 Since the calculation for generating the signature is a one-to-one mapping, for example, from (b 1 ..., b ra ); and the calculation of the verification signature is not a one-to-one mapping, for example, only getting ( Cl , . From the signature M to the original complete signed data 1 ..., a m ), that is, cannot be used for encryption.
当然, 若把它的公钥 (即加密算法) 中的多项式数量 n与变元数量 m设 置成一样多, 让其公钥成为置换方程组, 而不再是不定方程组, 则虽然可以从 签名 6还原出被签名的数据 fl (即具备加密的功能), 但容易被破译。 发明内容  Of course, if the number n of polynomials in its public key (ie, encryption algorithm) is set to be as much as the number of arguments m, let its public key become a system of substitution equations, and no longer an indefinite system of equations, although it can be signed from 6 Restore the signed data fl (that is, the function of encryption), but it is easy to be deciphered. Summary of the invention
本发明提供一种用于编码和译码数字消息的方法和装置,克服目前的 MQ 技术只能签名、 不能加密的缺点。  The present invention provides a method and apparatus for encoding and decoding digital messages that overcomes the shortcomings of current MQ techniques that can only be signed and not encrypted.
依据本发明实施例, 公开了一种用于编码和译码数字消息的方法, 具体可 以包括: 选择正整数/ w, n, 其中, m >n ; 生成一包含有 Ε(Λ 的公钥, 其中, Ε(χ)为在域 F上的从 :)到 , ...,;„:)的非线性映射函数组; 并且, 所述 中隐含有接口函数 其用于根据 :)得到"个关于 :)的 函数: MQ(X) = ( ...,xm), u0n(xi, ...,xm)) = R(x); 生成一与所述公钥相对 应的私钥, 所述私钥包括 R ; 设置单向函数链 HO), 以及单向函数链的逆 函数 Η— 通过单向函数链 ΗΟ)将消息 w转换为中间结果 X, 然后采用所述 公钥对所述中间结果 X进行编码, 得到编码结果 和, 采用所述私钥将编码 结果 变换为中间结果 z, 然后运用单向函数链的逆函数 H— )以及私钥将中 间结果 z转换为译码消息 w。 According to an embodiment of the present invention, a method for encoding and decoding a digital message is disclosed, which may specifically include: selecting a positive integer /w, n, where m >n; generating a public key containing Ε (Λ) Where Ε(χ) is a non-linear mapping function group from :) to , ...,; „:) on the domain F; and, the implicit interface function is used to obtain according to :) a function about :): MQ(X) = ( ..., x m ), u 0n (xi, ..., x m )) = R(x); generates a corresponding to the public key a private key, the private key comprising R; setting a one-way function chain HO), and an inverse function of the one-way function chain Η - converting the message w to an intermediate result X by a one-way function chain ,, and then using the public key Encoding the intermediate result X to obtain a coding result, transforming the coding result into an intermediate result z by using the private key, and then using the inverse function H_) of the one-way function chain and the private key The result z is converted to a decoded message w.
依据本发明实施例, 还公开了一种用于数字签名的方法, 具体可以包括: 选择正整数 w, n, n 其中, w >w≥w' ; 生成一包含有 E'(x)的公钥, 其中, E'W为在域 F上的从 ...,xm)m(y ...,JV)的非线性映射函数组;并且, 所述 E'W中隐含有接口函数 R O, 其用于根据 :)得到"个关于According to an embodiment of the present invention, a method for digital signature is further disclosed, which may specifically include: selecting a positive integer w, n, n where w > w ≥ w'; generating a public containing E'(x) Key, where E'W is a set of nonlinear mapping functions from ..., x m )m(y ..., JV) on the domain F; and, the E'W implicitly contains an interface function RO, which is used to get "about" based on :)
)的函数: U0(X) = ( o\(X\, ... , xm\ UQn{Xi, xm)) = R( ); 生成一与所述公 钥相对应的私钥, 所述私钥包括 R ; 设置单向函数链 HO), 以及单向函数 链的逆函数 Η— 采用所述私钥先把待签名的消息 /'变换为中间结果 ζ, 然 后运用单向函数链的逆函数 Η— ;)以及私钥将中间结果 ζ转换为数字签名 IV; 和, 通过单向函数链 HO)将数字签名 w转换为中间结果 X, 然后采用所述公 钥对所述中间结果 X进行译码, 得到译码结果 ^ 比较译码结果 J和待验证的 消息 , 根据比较结果确定数字签名 w是否正确。 Function: U 0 (X) = ( o\(X\, ... , x m \ U Qn {Xi, x m )) = R( ); generates a private key corresponding to the public key The private key includes R; sets a one-way function chain HO), and an inverse function of the one-way function chain Η - uses the private key to first convert the message to be signed /' into an intermediate result, and then uses a one-way function The inverse function of the chain ;-; and the private key converts the intermediate result 为 to the digital signature IV; and, by the one-way function chain HO) converts the digital signature w to the intermediate result X, and then uses the public key pair to the middle As a result, X is decoded to obtain a decoding result, and the decoding result J and the message to be verified are compared, and it is determined whether the digital signature w is correct based on the comparison result.
依据本发明实施例,还公开了一种用于编码和译码数字消息的方法,包括: 选择正整数 w, n, n r, 其中, m > n≥ ; 生成一包含有 E'(x, ID)的 公钥, 其中, E'(x,ID)为在域 F上的从 ...,xm,IDh
Figure imgf000006_0001
...,jv)的非 线性映射函数组, 所述 ID = (ID1 ...,ID 为授权用户的身份标识; 并且, 所述 E'( , ID)中隐含有接口函数 R(x),其用于根据 :)得到"个关于 ...,xm) 的函数: "Q(X) = ( uoi(x ...,xm), u0n(x ...,xm)) = R(x);针对身份标识为 ΙΌ(Κ) 的授权用户, 生成一与该身份标识相对应的私钥, 所述私钥包括 R ; 设置单 向函数链 HO), 以及单向函数链的逆函数 H^z); 采用所述公钥、 单向函数链 HO)和 ID(^), 对消息 进行编码, 得到编码消息 N; 采用所述私钥和单向函 数链的逆函数 H—1^)对该编码消息 N进行译码, 得到译码消息 ^ 和 /或, 采用 所述私钥和单向函数链的逆函数 H—1^)对消息 进行编码, 得到编码消息 采用所述公钥、 单向函数链 HO)和 π , 对该编码消息 N'进行译码, 得到 译码消息 '。
According to an embodiment of the invention, a method for encoding and decoding a digital message is also disclosed, comprising: selecting a positive integer w, n, nr, where m >n≥; generating one containing E'(x, ID Public key, where E'(x,ID) is from ..., x m , ID h on domain F
Figure imgf000006_0001
a non-linear mapping function group of ..., jv), the ID = (ID 1 ..., ID is an identity of the authorized user; and, the E' ( , ID) implicitly contains an interface function R ( x), which is used to get a function of ") about ..., x m ): "Q(X) = ( uoi(x ..., x m ), u 0n (x ..., x m )) = R(x); for an authorized user whose identity is ΙΌ(Κ), generate a private key corresponding to the identity, the private key includes R; set a one-way function chain HO), and a single The inverse function H^z) to the function chain; using the public key, the one-way function chain HO) and the ID (^), encoding the message to obtain the encoded message N; using the private key and the one-way function chain The inverse function H- 1 ^) decodes the encoded message N to obtain a decoded message ^ and/or, and encodes the message by using the private key and the inverse function H- 1 of the one-way function chain to obtain a code. The message uses the public key, the one-way function chain HO) and π to decode the encoded message N' to obtain a decoded message '.
依据本发明实施例,还公开了一种用于编码和译码数字消息的系统,包括: 公钥生成单元, 用于生成一包含有 的公钥, 其中, 为在域 F上的 从 ..., )到(^, 的非线性映射函数组, m, "为正整数, m > 并且, 所述 中隐含有接口函数 ,其用于根据 :)得到《个关于 ...,xm) 的函数: M0(X) = ( Mo^, = R(x); According to an embodiment of the present invention, a system for encoding and decoding a digital message is further provided, including: a public key generating unit, configured to generate an included public key, where, is a slave on the domain F: . , ) to (^, the nonlinear mapping function group, m, "is a positive integer, m > and, the implicitly contains an interface function, which is used to obtain "a", x m according to :) Function: M 0 (X) = ( Mo^, = R(x);
私钥生成单元,用于生成一与所述公钥相对应的私钥,所述私钥包括 R(x); 单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— a private key generating unit, configured to generate a private key corresponding to the public key, where the private key includes R(x) ; A one-way function chain determining unit for setting a one-way function chain HO) and an inverse function H of a one-way function chain
加密单元, 用于通过单向函数链 HO)将消息 w转换为中间结果 X, 采用 所述公钥对所述中间结果 X进行编码, 得到编码结果 J; 和  An encryption unit, configured to convert the message w into an intermediate result X by a one-way function chain HO), and encode the intermediate result X by using the public key to obtain a coding result J;
解密单元, 用于采用所述私钥将编码结果 J变换为中间结果 Z, 运用单向 函数链的逆函数 H—1^)以及私钥将中间结果 z转换为译码消息 w。 The decryption unit is configured to convert the encoding result J into an intermediate result Z by using the private key, convert the intermediate result z into a decoding message w by using an inverse function H- 1 of the one-way function chain and a private key.
依据本发明实施例, 还公开了一种用于数字签名的系统, 包括:  According to an embodiment of the invention, a system for digital signature is also disclosed, including:
公钥生成单元, 用于生成一包含有 Ε' 的公钥, 所述 Ε' 为在域 F上的 从 :)到 , ..., .)的非线性映射函数组; 并且, 所述 Ε'(χ)中隐含有接 口函数 R(x), 其用于根据 xra:)得到"个关于 :)的函数: "( x) = ( o\(x\, ... , xm), o„(x\, ... , Xm ) = R( );其中, wi, π, 为正整数, m > π≥ n, ; 私钥生成单元,用于生成一与所述公钥相对应的私钥,所述私钥包括 R(x); 单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— a public key generating unit, configured to generate a public key containing Ε', which is a non-linear mapping function group from :) to , ..., .) on the domain F; '(χ) implicitly contains the interface function R(x), which is used to get a "about:" function according to x ra :): "( x) = ( o\(x\, ... , x m ), o„(x\, ... , Xm ) = R( ); where wi, π, is a positive integer, m > π≥ n, ; a private key generation unit for generating a public key Corresponding private key, the private key includes R(x) ; a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H of the one-way function chain
签名单元, 用于采用所述私钥把待签名的消息 /'变换为中间结果 z, 运用 单向函数链的逆函数 H—1 ( 以及私钥将中间结果 z转换为数字签名 IV; 以及 验证单元, 用于通过单向函数链 HO)将数字签名 w转换为中间结果 X, 采用所述公钥对所述中间结果 X进行译码, 得到译码结果 ^ 以及, 比较译码 结果 J和待验证的消息 , 根据比较结果确定数字签名 w是否正确。 a signature unit, configured to convert the message to be signed/' into an intermediate result z by using the private key, using an inverse function H- 1 of the one-way function chain (and a private key to convert the intermediate result z into a digital signature IV; and verifying a unit for converting a digital signature w into an intermediate result X by a one-way function chain HO, decoding the intermediate result X with the public key, obtaining a decoding result ^ and comparing the decoding result J and waiting The verified message determines whether the digital signature w is correct based on the comparison result.
依据本发明实施例, 还公开了一种用于编码和译码数字消息的系统, 至少 包括:  According to an embodiment of the present invention, a system for encoding and decoding a digital message is further disclosed, including at least:
公钥生成单元,用于生成一包含有 E'(x, ID)的公钥,所述 E'(x, ID)为在域 F上的从 IDb ..., IDr)ilJ(y!, j )的非线性映射函数组, 所述 ID = (ID1; ...,ID 为授权用户的身份标识; 并且, 所述 E'(x, ID)中隐含有接口函数 R(x),其用于根据 得到"个关于 ..., )的函数: u0(x) = ( uoi(x ..., xm), ... , u0n(x , ... , Xm ) = R(x); 其中, m, n, r , r为正整数, m >n>n' ; 私钥生成单元, 用于针对身份标识为 π 的授权用户, 生成一与该身份 标识相对应的私钥, 所述私钥包括 R ; a public key generating unit, configured to generate a public key including E'(x, ID), which is a slave ID b ..., ID r ) ilJ (y) on the domain F !, j) of the non-linear mapping function group, the ID = (ID 1; ..., ID is the identity of the authorized user; and, the E' (x, ID) implicitly contains the interface function R ( x), which is used to get a function of "one about...,": u 0 (x) = ( uoi(x ..., x m ), ... , u 0n (x , ... , Xm ) = R(x); where m, n, r , r are positive integers, m >n>n'; a private key generating unit is configured to generate an identity with the authorized user whose identity is π Corresponding private key, the private key includes R;
单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— 以及至少包括加解密单元和签名验证单元中的一个, 其中,  a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H− of the one-way function chain, and at least one of an encryption/decryption unit and a signature verification unit, wherein
加解密单元, 用于采用所述公钥、 单向函数链 HO)和 ID(^), 对消息 进行编码, 得到编码消息 N; 采用所述私钥和单向函数链的逆函数 H— )对该 编码消息 N进行译码, 得到译码消息 ; An encryption and decryption unit for using the public key, the one-way function chain HO) and the ID (^), for the message Encoding, obtaining the encoded message N; using the private key and the inverse function H-) of the one-way function chain to decode the encoded message N to obtain a decoded message;
或者, 签名验证单元, 用于采用所述私钥和单向函数链的逆函数 H- )对 消息 进行编码,得到编码消息 N,;采用所述公钥、单向函数链 HO)和 Π , 对该编码消息 N'进行译码, 得到译码消息 7 。  Alternatively, the signature verification unit is configured to encode the message by using the private key and the inverse function H-) of the one-way function chain to obtain the encoded message N, and use the public key, the one-way function chain HO) and Π, The encoded message N' is decoded to obtain a decoded message 7.
与现有技术相比, 本发明具有以下优点:  Compared with the prior art, the present invention has the following advantages:
( 1 )本发明的加密算法以及可恢复的签名算法, 其明文与密文、签名与数 据之间的转换, 等价为其一部分方程为单向函数的联立置换方程组。 由于单向 函数以一种几乎随机的方式把比特串映射到比特串,彻底破坏了原有的代数关 系, 使得单向函数链的数学变换规则等价于稠密多项式组, 把它完全展开需要 占用指数级的存储空间, 从而在解方程时, 必然会遇到单向函数难以展开的巨 大困难。  (1) The encryption algorithm and the recoverable signature algorithm of the present invention, the conversion between plaintext and ciphertext, signature and data, are equivalent to a simultaneous replacement equations in which a part of the equation is a one-way function. Since the one-way function maps the bit string to the bit string in an almost random manner, the original algebraic relationship is completely destroyed, so that the mathematical transformation rule of the one-way function chain is equivalent to the dense polynomial group, and it needs to be fully expanded. Exponential storage space, in the process of solving the equation, will inevitably encounter the great difficulty of one-way function is difficult to expand.
(2)本发明进一歩将安全性归结为交替运用因式分解(factorization, 主要 针对 "乘法")和函数分解 (decomposition, 主要针对 "迭代") 来分析隐藏在 该有理分式不定方程组内部的多层嵌套结构的困难性;把多个简单函数组合成 复杂函数, 使密码的安全性不依赖于单一的变量, 而依赖于多层的连锁关系, 从而实现了:直接设置一个复杂表述的数学难题, 但这个难题很难被证明等价 于一个已知的简单表述的数学难题。  (2) The present invention further clarifies the security by alternately applying factorization (mainly for "multiplication") and function decomposition (decomposition (mainly for "iteration") to analyze hidden within the rational fractional indefinite equations. The difficulty of multi-level nested structure; the combination of multiple simple functions into complex functions, so that the security of the password does not depend on a single variable, but depends on the multi-level chain relationship, thus achieving: directly set a complex representation Mathematical puzzles, but this puzzle is hard to prove equivalent to a mathematical problem known as a simple representation.
(3 )在保持明文、签名的分组长度不变的条件下, 可通过增加公钥的函数 规模, 来任意增加密码系统的安全性。  (3) Under the condition that the length of the plaintext and the signed packet are kept the same, the security of the cryptosystem can be arbitrarily increased by increasing the function size of the public key.
其次, 在 MQ发表后的 20多年, 才由发明人提出了本技术方案, 其技术 创新性充分体现在:  Secondly, in the 20 years after the publication of MQ, the inventor proposed this technical solution, and its technological innovation is fully reflected in:
( 1 ) 由 "单向函数链"而带来的意想不到的有益效果, 需要足够高的数 学水平才能理解。 例如, 为什么 MQ 只能签名、 不能加密? 其原因是: 如果 MQ 的公钥是置换方程 (即它的变元数量与多项式数量相等), 就容易被 Grobner base (格罗布纳基) 等方法破译。 Gr0bner base属于抽象代数的范畴, 有深刻的理论背景。对于本领域一般技术人员来说, 提出对抗 Gr0bner base攻 击的有效方法, 需要做创造性的研究。 本发明创新的将单向函数组成函数链, 并与接口函数以及公私钥有机结合,一方面实现了编码译码过程的可逆性(即 使在变元数量大于多项式数量的情况下), 另一方面使得运用 Gr0bner base等 方法破译必然会遇到稠密多项式的分解问题。 (2) 提出 "单向函数链" 的概念, 并设计出可行的、 实用的、 完整的技 术解决方案, 需要很高的技术门槛: 不仅要把握当代数学前沿的进展, 还要有 丰富的实际编码经验和分析水平, 能熟练地运用一些特殊的数学技巧, 对密码 的规律和本质有深刻的理解,并有一定的工程实现能力,此外还要依赖于灵感、 机遇等非确定因素; 而不是有了资金投入就一定能解决的问题。本说明书给出 的大量诀窍性信息, 经历了从科学理论到编码实践的反复过程, 是发明人长期 思考的结果。本发明的完成还涉及到大量数学公式的自动化推导技术, 需要编 制专用的软件系统。如果没有这些开拓性的研究积累, 本领域一般技术人员很 难完成方案的设计。 (1) The unexpected benefits brought about by the "one-way function chain" require a sufficiently high level of mathematics to understand. For example, why is MQ only signed and not encrypted? The reason is: If the public key of MQ is a displacement equation (that is, its number of arguments is equal to the number of polynomials), it is easy to be deciphered by methods such as Grobner base. Gr0bner base belongs to the category of abstract algebra and has a profound theoretical background. For those of ordinary skill in the art, an effective method of combating Gr0bner base attacks is required, and creative research is required. The innovative invention combines a one-way function into a function chain, and organically combines with an interface function and a public-private key, on the one hand, realizes the reversibility of the coding and decoding process (even if the number of arguments is greater than the number of polynomials), on the other hand The use of Gr0bner base and other methods to decipher will inevitably encounter the decomposition problem of dense polynomials. (2) Proposing the concept of "one-way function chain" and designing feasible, practical, and complete technical solutions requires a high technical threshold: not only to grasp the progress of contemporary mathematics, but also to have rich practical Coding experience and level of analysis, skilled in using some special mathematical skills, have a deep understanding of the law and nature of passwords, and have certain engineering realization capabilities, in addition to relying on indeterminate factors such as inspiration, opportunity; With the capital investment, it will definitely solve the problem. The large amount of defamatory information given in this manual has gone through the iterative process from scientific theory to coding practice, which is the result of long-term thinking of the inventors. The completion of the present invention also involves an automated derivation technique for a large number of mathematical formulas, requiring the development of a dedicated software system. Without these pioneering research accumulations, it is difficult for a person of ordinary skill in the art to complete the design of the solution.
(3 )提出 "单向函数链"的技术方案, 需要克服技术偏见。 1985年以来, 国际密码学术界对 MQ进行了深入分析, 发表了大量文献, 尤其是最近 Wolf的 总结性研究 (C. Wolf, {Multivariate Quadratic Polynomials in Public Key Cryptography》, Katholieke Universiteit Leuven, ISBN 90-5682-649-2, 2005. ) , 提出构造 MQ的十种基本算法, 四种基本陷门, 在分析现有技术进展的基础上 设计出一种扩展 TTS签名方案等。 但 Wolf的研究仍然不能从根本上克服上述 (3) To propose a technical solution of "one-way function chain", it is necessary to overcome technical bias. Since 1985, the international cryptographic academia has conducted an in-depth analysis of MQ and published a large amount of literature, especially the recent Wolf's summary study (C. Wolf, {Multivariate Quadratic Polynomials in Public Key Cryptography), Katholieke Universiteit Leuven, ISBN 90- 5682-649-2, 2005. ), proposed ten basic algorithms for constructing MQ, four basic trapdoors, and designed an extended TTS signature scheme based on the analysis of existing technology. But Wolf’s research still cannot fundamentally overcome the above.
MQ的缺点。 20多年来的大部分研究都是在 MQ框架内部挖潜力, 而没有像本 发明那样冲破 MQ框架向外部拓展——添加单向函数链, 在更大的算法空间中 建立新的公钥密码体制。 The shortcomings of MQ. Most of the research in the past 20 years has digging potential within the MQ framework, without breaking the MQ framework to the outside as in the present invention - adding a one-way function chain to create a new public key cryptosystem in a larger algorithm space. .
此外, 单向函数链的设计还克服了长久以来对单向函数在理解、使用上的 技术偏见:虽然单个的单向函数不可逆,但把若干个单向函数巧妙地组织起来, 形成了一个相互制约的系统一一单向函数链, 却是可逆的; 目前对单向函数的 传统应用主要考察它的不可求逆性和抗碰撞性,而本发明则进一歩要求它还要 具备用多项式来表示时的稠密性。  In addition, the design of the one-way function chain overcomes the long-standing technical bias of understanding and using one-way functions: although a single one-way function is irreversible, several one-way functions are skillfully organized to form a mutual The restricted system-one-way function chain is reversible. At present, the traditional application of the one-way function mainly investigates its irreversibility and collision resistance, and the present invention further requires that it be provided with polynomials. Indicates the density of the time.
本发明的优选技术方案, 与 MQ相比, 其有益效果还体现在:  The preferred technical solution of the present invention has the beneficial effects compared with MQ:
( 1 ) 用有理分式取代多项式, 相当于把 MQ的二次稀疏多项式提升为高 次稠密多项式, 使等价于公钥的多项式函数的规模发生爆炸, 从本质上提高了 求不定方程组的逆函数的困难性。  (1) Replacing a polynomial with rational fractions is equivalent to raising the quadratic sparse polynomial of MQ to a higher-order dense polynomial, exposing the scale of the polynomial function equivalent to the public key, essentially improving the indefinite equations. The difficulty of the inverse function.
(2)运用 ID映射的方法, 建立基于身份的工作方式。全网所有用户共用 一个公钥, 为网络环境下的公钥管理带来了极大的方便。运用 "多个分配中心 合成私钥"和 "私钥形态个性化" 的方法, 提高密码系统的抗合谋攻击能力。 附图说明 (2) Using the ID mapping method to establish an identity-based working method. All users on the entire network share a public key, which brings great convenience to public key management in the network environment. The method of "compositing private keys with multiple distribution centers" and "personalization of private key forms" is used to improve the anti-collusion attack ability of the cryptosystem. DRAWINGS
图 1是本发明用于编码和译码数字消息的方法实施例的歩骤流程图; 图 2是本发明用于数字签名的方法实施例的歩骤流程图;  1 is a flow chart of an embodiment of a method for encoding and decoding a digital message according to the present invention; FIG. 2 is a flow chart of an embodiment of a method for digital signature of the present invention;
图 3是本发明实施例的数据流向示意图;  3 is a schematic diagram of data flow direction according to an embodiment of the present invention;
图 4是本发明 H(x)、 R(x)与 H— 的关系示意图;  Figure 4 is a schematic diagram showing the relationship between H(x), R(x) and H- of the present invention;
图 5是本发明 m=3、 n=2的小数据实施例的加密或验证签名过程的数据流 向图;  5 is a data flow diagram of an encryption or verification signature process of a small data embodiment of m=3, n=2 of the present invention;
图 6是本发明 m=3、n=2的小数据实施例的解密或签名过程的数据流向图; 图 7 是本发明基于身份方式下用于编码和译码数字消息的优选实施例的 歩骤流程图;  Figure 6 is a data flow diagram of the decryption or signature process of the small data embodiment of m = 3, n = 2 of the present invention; Figure 7 is a preferred embodiment of the present invention for encoding and decoding digital messages in an identity based manner. Flow chart
图 8是本发明多个私钥分配中心联合建立私钥的示意图;  8 is a schematic diagram of jointly establishing a private key by multiple private key distribution centers of the present invention;
图 9是本发明 m=U、 n=8的小数据实施例实现私钥形态个性化的数据流 向图;  9 is a data flow diagram of implementing a private key form personalization of a small data embodiment of m=U and n=8 of the present invention;
图 10是本发明 m=U、 n=8的小数据实施例的加密过程数据流向图。  Figure 10 is a flow chart of the encryption process of the small data embodiment of m = U, n = 8 of the present invention.
具体实施方式 为使本发明的上述目的、特征和优点能够更加明显易懂, 下面结合附图和 具体实施方式对本发明作进一歩详细的说明。 The present invention will be further described in detail with reference to the accompanying drawings and specific embodiments.
本发明属于信息安全产品的范畴, 主要应用于网络信任系统, 例如证件、 银行、 手机、 互联网、 电子商务、 电子政务、 物流、 网络监控、 权力控制、 资 金转移、 交易、 数据加密等环节。  The invention belongs to the category of information security products and is mainly applied to network trust systems, such as documents, banks, mobile phones, internet, e-commerce, e-government, logistics, network monitoring, power control, fund transfer, transactions, data encryption and the like.
应用本发明所需的硬件环境属于本领域技术人员所熟知的知识。其中: 公 钥生成单元、 私钥生成单元、 单向函数链确定单元, 涉及到复杂数学公式的自 动化推导, 一般应采用高端的计算机系统; 加解密单元、 签名验证单元, 只涉 及到对给定的数学式的求值计算, 可采用各种档次的硬件平台, 例如单片机、 专用数字信号处理芯片、 智能卡等。  The hardware environment required to apply the present invention is well known to those skilled in the art. Among them: public key generation unit, private key generation unit, and one-way function chain determination unit, which involve automatic derivation of complex mathematical formulas, generally should adopt high-end computer system; encryption and decryption unit, signature verification unit, only related to given The mathematical calculation of the calculation can be carried out in various grades of hardware platforms, such as single-chip microcomputers, dedicated digital signal processing chips, smart cards, and the like.
下面对本发明可能涉及的一些术语进行简单解释:  Some of the terms that may be involved in the present invention are briefly explained below:
密码:通常可理解为进行信息加密和解密变换的算法。它的基本目的是伪 装信息, 使局外人不能理解信息的真正含义, 而局内人能够理解伪装信息的本 来含义。  Password: Generally understood as an algorithm for information encryption and decryption transformation. Its basic purpose is to disguise information so that outsiders cannot understand the true meaning of the information, and insiders can understand the original meaning of the disguised information.
密钥:在执行密码算法的过程中, 唯一能控制明文与密文之间进行有效变 换的关键参数, 叫做密钥。 Key: In the process of executing the cryptographic algorithm, the only thing that can control the effective change between plaintext and ciphertext The key parameter to change is called the key.
公钥密码体制: 公钥密码体制使用两个密钥——一个公开密钥(简称: 公 钥) 和一个私人密钥 (简称: 私钥)。 公钥和私钥在数学上是相关的, 但由公 钥计算出私钥是困难的。公钥可在通信双方之间公开传递, 也可以像电话号码 本一样公开发布, 私钥则由授权用户自己秘密保管。任何人从某个用户的名字 就能查到它的公钥, 因而可以给这个用户发送加密消息。只有授权用户自己才 能用他的私钥完成解密。  Public key cryptosystem: The public key cryptosystem uses two keys—a public key (referred to as: public key) and a private key (referred to as: private key). The public and private keys are mathematically related, but it is difficult to calculate the private key from the public key. The public key can be publicly transmitted between the communicating parties, or it can be publicly published as a telephone number, and the private key is kept in secret by the authorized user. Anyone can find its public key from the name of a user, so it can send an encrypted message to this user. Only authorized users can use their private key to complete the decryption.
公钥密码体制还提供了数字签名及认证的能力:授权用户能用他的私钥对 信息进行签名 (相当于上述用私钥解密的过程); 其他用户由于不掌握私钥而 不能进行签名,但能用该用户的公钥验证签名的正确性(相当于上述用公钥加 密的过程)。 数字签名算法有两种类型: 可恢复的数字签名体制: 由签名可以 推导出被签名的数据; 不可恢复的数字签名体制: 由签名不能推导出被签名的 数据。  The public key cryptosystem also provides the ability to digitally sign and authenticate: an authorized user can sign the information with his private key (equivalent to the process of decrypting with the private key described above); other users cannot sign because they do not have the private key. However, the user's public key can be used to verify the correctness of the signature (equivalent to the above process of encrypting with the public key). There are two types of digital signature algorithms: Recoverable digital signature scheme: The signed data can be derived from the signature; Unrecoverable digital signature scheme: The signed data cannot be derived from the signature.
有限域(finite field) : 是一种具体而又形象的数学结构, 可以通俗地理解 为能进行加减乘除四则运算的有限个元素的集合。 (通常记做 F, 当有限域的 元素数量为素数;?时, 记做 F 。)  Finite field: It is a concrete and visual mathematical structure that can be understood in a colloquial manner as a collection of finite elements that can be added, subtracted, multiplied, and divided. (usually denoted as F, when the number of elements in the finite field is prime;?, denote F.)
有限域上的多项式(polynomial):可以通俗地理解为:当只有一个变元时: f (x) = asxs + as- \ XsA +…十 α0χ0 (mod p) 其中 叫作变元, 叫作系数, 叫作项, 它们的取值在 Ο, ... ,/7-l之间取值。 当 有多个变元时: Polynomial over a finite field: can be understood in a common sense: when there is only one argument: f (x) = a s x s + a s - \ X sA +... ten α 0 χ 0 (mod p) where Called as an argument, called a coefficient, called a term, their values are between Ο, ..., /7-l. When there are multiple arguments:
f(x ..., xn ) =f(x ..., x n ) =
Figure imgf000011_0001
(mod;?)
Figure imgf000011_0001
(mod;?)
F上的多项式集合, 对于多项式四则运算是域, 叫作 F的多项式扩域。 如果多项式中的项的数量相对很少, 叫做稀疏多项式; 反之叫做稠密多项 式。稠密多项式不仅有很高的次数, 而且项的数量非常多, 把它展开来表示需 要占用很大的空间位置。 The polynomial set on F, the polynomial four is the domain, called the polynomial extension of F. If the number of terms in a polynomial is relatively small, it is called a sparse polynomial; otherwise it is called a dense polynomial. Dense polynomials not only have a high number of times, but the number of items is very large, and it is expanded to indicate that it takes a lot of space.
有限域上的有理分式 (rational fraction) : 可理解为两个多项式相除:  Rational fraction on a finite field: It can be understood as dividing two polynomials:
/(JCl "' ") mod ^ 除了 0多项式以外的多项式的乘法逆为 /(JCl "'") mod ^ The multiplicative inverse of a polynomial other than the polynomial of 0 is
( ¾ ..., χη)) - 1 (mod ) = (f(xh ... , χη)Υ~2 (mod ρ) 但当 ρ较大时,把上式展开需要巨大的存储空间,因此两个稀疏多项式相除(分 母不为 0多项式) 的结果, 通常是一个稠密多项式: ( 3⁄4 ..., χ η )) - 1 (mod ) = (f(x h ... , χ η )Υ~ 2 (mod ρ) But when ρ is large, the expansion of the above formula requires huge storage The result of space, therefore the division of two sparse polynomials (the denominator is not a polynomial), usually a dense polynomial:
/( =Rxl,...,xn)-{g{xl,...,xn))p-2 (mod^) 该性质对于理解有理分式公钥密码的安全性非常重要。 F上的有理分式集 合, 对于有理分式的四则运算是域, 叫作 F的有理分式扩域。 /( =Rx l ,...,x n )-{g{x l ,...,x n )) p - 2 (mod^) This property is very important for understanding the security of rational fractional public key cryptography . The rational fractional set on F, the four arithmetic operations on the rational fraction is the domain, called the rational fractional extension of F.
有限域上的不定方程组 (indeterminate equation system) 设有限域上的方 程组为:  The indeterminate equation system on the finite field has a range group on the limit field:
^{xx,...,xm) mod p = 0 ^{x x ,...,x m ) mod p = 0
其中 :)为多项式或者有理分式, 如果未知元数量 m多于方程数量 n, 上式称为 的 /7元《阶不定方程组, 通常也称为丢番图方程。 不定方程组的 解是一个很大的 的向量值的集合。 Where :) is a polynomial or rational fraction. If the number of unknown elements is more than the number n of equations, the above equation is called the /7 element of the indefinite equations, usually called the Diophantine equation. The solution of an indefinite system of equations is a large collection of vector values.
当上述不定方程组有解时, 它的解通常是一个由有限域上 维空间中的 点组成的集合,可以表现为代数曲线、代数曲面乃至高度复杂的高维代数簇 (若 干个多项式的公共根的集合)。  When the above indefinite system of equations has a solution, its solution is usually a set of points in the dimensional space on the finite field, which can be expressed as algebraic curves, algebraic surfaces or even highly complex high-dimensional algebraic clusters (a common to several polynomials) The collection of roots).
单向函数: 设函数为 _y = Hash , 已知 X计算 _y是容易的, 反之由 _y计算 X是困难的, 这种函数称为单向函数, 也叫做杂凑函数、 散列函数、 Hash函数 等, 已被广泛应用于数据完整性检验和信息认证。它把一个任意长度的数据 X, 经过复杂的运算转换成一个固定长度或固定数域的数值或信息串 _y。  One-way function: Let the function be _y = Hash, it is easy to calculate X _y, and it is difficult to calculate X from _y. This function is called one-way function, also called hash function, hash function, Hash functions, etc., have been widely used in data integrity testing and information authentication. It converts an arbitrary length of data X into a fixed-length or fixed-number field or a string _y.
构造单向函数的方法属于公知技术。 当前最流行的单向函数算法是 MD5 和 SHA-1 (美国联邦信息处理标准 FIPS 180-1); 更强的单向函数算法还有 SHA-256, SHA-384和 SHA-512等 (美国联邦信息处理标准 FIPS 180-2)。  Methods of constructing one-way functions are well known in the art. The most popular one-way function algorithms are MD5 and SHA-1 (Federal Information Processing Standard FIPS 180-1); stronger one-way function algorithms are SHA-256, SHA-384 and SHA-512 (US Federation) Information Processing Standard FIPS 180-2).
本发明中规定的域 F, 可采用元素数量为素数;?的有限域 F , 但不局限于 这种 而是可以推广到各种域。 当 F为有限域时, 函数或变元的幂运算, 包括整数幂运算和分数幂运算, 在经过展开、 化简、 整理之后, 均可以转换成 有理分式的表示形式。 The domain F specified in the present invention may adopt a finite field F in which the number of elements is a prime number; but is not limited to this and can be extended to various domains. When F is a finite field, the power operations of functions or arguments, including integer power operations and fractional power operations, can be converted into expanded, simplified, and organized A rational representation of the fraction.
本发明中所述的编码消息可以由一地点的用户产生, 并传送至另一地点, 然后由该另一地点的用户译码, 即编码译码可以不在同一地点。 当然, 在同一 地点进行编码和译码是一种更简单的情况。  The encoded message described in the present invention may be generated by a user of a location and transmitted to another location and then decoded by the user of the other location, i.e., the coded decoding may not be co-located. Of course, encoding and decoding at the same location is a simpler case.
参照图 1, 示出了本发明一种用于编码和译码数字消息的方法实施例的歩 骤流程图, 具体可以包括以下歩骤:  Referring to FIG. 1, there is shown a flow chart of an embodiment of a method for encoding and decoding a digital message according to the present invention, which may specifically include the following steps:
歩骤 101、 选择正整数 w, n, 其中, m>n ;  Step 101: Select a positive integer w, n, where m>n;
歩骤 102、 生成一包含有 E(x)的公钥, 其中, E(x)为在域 F上的从 Step 102: Generate a public key including E(x), where E(x) is a slave in domain F
)到(^, 的非线性映射函数组; 并且,所述 E(x)中隐含有接口函数 R(x), 其用于根据 (Xl, .,Xra)得到《个关于 (Xl, .,Xra)的函数:《0(X) = ( .. Xnr), …-,To the nonlinear mapping function group of (^,; and the interface function R(x) is implicitly contained in the E(x), which is used to obtain "Xl, according to (Xl, ., X ra ) ., X ra ) function: " 0 (X) = ( .. Xnr), ... -,
U0n(X\, ···, )) = R(X); U0n(X\, ···, )) = R(X);
歩骤 103、 生成一与所述公钥相对应的私钥, 所述私钥包括 R ;  Step 103: Generate a private key corresponding to the public key, where the private key includes R;
歩骤 104、 设置单向函数链 HO), 以及单向函数链的逆函数 H—1^; Step 104, setting a one-way function chain HO), and an inverse function of the one-way function chain H- 1 ^;
歩骤 105、通过单向函数链 HO)将消息 w转换为中间结果 X,然后采用所 述公钥对所述中间结果 X进行编码, 得到编码结果 和  Step 105: Convert the message w into an intermediate result X through a one-way function chain HO), and then encode the intermediate result X by using the public key to obtain a coding result and
歩骤 106、 采用所述私钥将编码结果 变换为中间结果 z, 然后运用单向 函数链的逆函数 H—1^)以及私钥将中间结果 z转换为译码消息 w。 Step 106: Convert the encoding result into an intermediate result z by using the private key, and then convert the intermediate result z into the decoding message w by using the inverse function H- 1 ^) of the one-way function chain and the private key.
对于本实施例而言, 可以应用各种加解密的场合, 例如, 歩骤 105主要应 用于加密的情况, 而歩骤 106主要应用于解密的情况。 当然, 对于不同的应用 场合, 参数不同, 其编译码的性能也有优劣之分, 本说明书后面会提出更为优 选的实施例加以说明。  For the present embodiment, various types of encryption and decryption can be applied. For example, step 105 is mainly applied to the case of encryption, and step 106 is mainly applied to the case of decryption. Of course, for different applications, the parameters are different, and the performance of the compiled code is also good or bad. A more preferred embodiment will be described later in the specification.
参照图 2,示出了本发明一种用于数字签名的方法实施例,具体可以包括: 歩骤 201、 选择正整数 w, n, n 其中, w >w≥w, ;  Referring to FIG. 2, an embodiment of a method for digital signature according to the present invention is shown. Specifically, the method may include: Step 201: Select a positive integer w, n, n where w > w ≥ w, ;
歩骤 202、生成一包含有 E'(x)的公钥,其中, Ε' 为在域 F上的从 xm)m(y .. 的非线性映射函数组;并且,所述 E'W中隐含有接口函数 Ι , 其用于根据 ( l, 得到"个关于 (Xi, 的函数:"Q(X) = ( ...,xm), ...,
Figure imgf000013_0001
Step 202: Generate a public key including E'(x), where Ε' is a non-linear mapping function group of x m )m (y.. on the domain F; and, the E'W The implicit interface function Ι is used to get a function about (Xi, (Q(X) = ( ..., x m ), ..., according to ( l,
Figure imgf000013_0001
歩骤 203、 生成一与所述公钥相对应的私钥, 所述私钥包括 R ;  Step 203: Generate a private key corresponding to the public key, where the private key includes R;
歩骤 204、 设置单向函数链 HO), 以及单向函数链的逆函数 H—1^; Step 204, setting a one-way function chain HO), and an inverse function of the one-way function chain H- 1 ^;
歩骤 205、 采用所述私钥先把待签名的消息 /'变换为中间结果 z, 然后运 用单向函数链的逆函数 H—1 ( 以及私钥将中间结果 z转换为数字签名 IV; 和 歩骤 206、通过单向函数链 HO)将数字签名 iv转换为中间结果 x,然后采 用所述公钥对所述中间结果 X进行译码, 得到译码结果 ^ Step 205: using the private key to first convert the message to be signed /' into an intermediate result z, and then using the inverse function H- 1 of the one-way function chain (and the private key to convert the intermediate result z into a digital signature IV; Step 206: Convert the digital signature iv into an intermediate result x through a one-way function chain HO), and then decode the intermediate result X by using the public key to obtain a decoding result.
歩骤 207、 比较译码结果 和待验证的消息 , 根据比较结果确定数字签 名 w是否正确。  Step 207: Compare the decoding result with the message to be verified, and determine whether the digital signature w is correct according to the comparison result.
对于本实施例而言, 可以应用各种数字签名的场合, 例如, 歩骤 205主要 应用于对消息进行签名的情况,而歩骤 206和 207则主要应用于对签名进行验 证的情况。  For the present embodiment, various digital signatures can be applied. For example, step 205 is mainly applied to the case of signing a message, and steps 206 and 207 are mainly applied to the case of verifying a signature.
将上述两个实施例统一起来看, 实际上, 当 > «≥«'时, 可以应用于各 种数字签名的情况, 而当 > « = «'时, 可以应用于各种加解密的情况。  Combining the above two embodiments, in fact, when > «≥«', it can be applied to various digital signatures, and when > « = «', it can be applied to various encryption and decryption cases.
在设计中, 一个给定的 E(x)不一定就是一个公钥 E'(x) (假设公钥没有其 他参数时, 公钥就可以认为是 Ε' ) , 根据《=« '还是 后者是前者的全 部或一部分。  In design, a given E(x) is not necessarily a public key E'(x) (assuming the public key has no other parameters, the public key can be considered as Ε'), according to "=« ' or the latter It is all or part of the former.
一个公钥在数学性质上、 即在给定的输入输出消息的变换规则上, 只对应 一个私钥; 当然这个私钥可以采用不同的表现形式。  A public key corresponds mathematically to the transformation rules of a given input and output message, and only one private key; of course, this private key can take different representations.
建立公钥与私钥的具体方法很多, 这属于数学设计方面的内容, 在公钥体 制的应用的这么多年中,本领域技术人员也具有了较多的针对该方面的技术沉 淀, 在此不详述了。但本发明可以给出一个较为优选的基本思路: 随机产生若 干个简单的可逆线性变换与可逆非线性变换, 运用各种方法(迭代、 相乘、 相 除、 相加等) 组装成一个整体, 再展开、 化简、 整理而得到一个公钥; 运用这 些可逆线性变换和可逆非线性变换的逆函数, 可以对公钥求逆, 作为该公钥对 应的私钥。  There are many specific methods for establishing public and private keys. This is a content of mathematical design. In the years of application of public key systems, those skilled in the art have more technical precipitation for this aspect. Detailed. However, the present invention can give a more preferable basic idea: randomly generate a number of simple reversible linear transformations and reversible nonlinear transformations, and assemble them into a whole by various methods (iteration, multiplication, division, addition, etc.). Then re-expand, simplify, and organize to obtain a public key; using these inverse functions of reversible linear transformation and reversible nonlinear transformation, the public key can be inverted as the private key corresponding to the public key.
参照图 3, 所示的是本发明实施例的数据流向图, 包括加解密和数字签名 等数据处理流程。 其中, > « = «'时, 可以用于加解密以及可恢复的签名; 当 > « > «'时, 可以用于不可恢复的签名。  Referring to Fig. 3, there is shown a data flow diagram of an embodiment of the present invention, including data processing procedures such as encryption and decryption and digital signature. Among them, > « = «' can be used for encryption and decryption and recoverable signatures; when > « > «', it can be used for unrecoverable signatures.
对于可恢复的签名,译码消息和原始消息的全部数据进行比较, 即可判断 出是否属于正确的签名; 而对于不可恢复的签名 (即说明书中《>« '的情况), 是用译码消息与原始消息的一部分进行比较, 即可判断出是否属于正确的签 名。  For a recoverable signature, the decoded message is compared with all the data of the original message to determine whether it belongs to the correct signature; and for the unrecoverable signature (ie, the case of ">«' in the specification), it is decoded. The message is compared to a portion of the original message to determine if it is the correct signature.
上述实施例的歩骤中并没有必然的先后顺序,数字排序仅仅是为了说明的 方便, 各歩骤的顺序可以实际情况进行调整。 其中, 所述的 "单向函数"的具 体实现方法, 属于公知技术, 在此就不详述了。 本实施例引入了单向函数链, 用于先将原始消息进行扩张, 然后再压缩, 并能够满足可逆的需求, 因而, 能够在具有较高安全性能的情况下适用于各种 加解密和数字签名的场合。 There is no inevitable sequence in the steps of the above embodiments. The numerical ordering is only for convenience of explanation, and the order of each step can be adjusted in actual situations. The specific implementation method of the "one-way function" is a well-known technique and will not be described in detail herein. This embodiment introduces a one-way function chain for expanding the original message, then compressing it, and satisfying the reversible requirement. Therefore, it can be applied to various encryption and decryption and digital numbers with high security performance. Signature occasion.
单向函数链具有如下两个性质:  A one-way function chain has the following two properties:
一是复杂性: 其数学性质应理解为稠密多项式函数组: One is complexity: its mathematical properties should be understood as a set of dense polynomial functions:
Figure imgf000015_0001
···," ),
Figure imgf000015_0001
···," ),
上式作为把明文变换成密文的置换方程组的一部分, 使解方程遇到巨大困难; 二是可逆性: 当 〉《时, (x1 中有一部分变元是多余的, 只需要其 中的《个变元就能恢复出 01 ...,! )。 例如在图 5的实施例中, 不使用 x3, 只 要运用 A、 X2依次计算: W2 = X2_ ¾( ), WX =^!-¾(^2), 就能恢复出 WlThe above formula is part of the permutation equations that transform plaintext into ciphertext, which makes the equations encounter great difficulties. Second, reversibility: When 〉“, (x 1 has some arguments that are superfluous, only need one of them) "A variable can recover 0 1 ...,!". For example, in the embodiment of FIG. 5, without using x 3 , as long as A and X 2 are sequentially calculated: W 2 = X 2 _ 3⁄4 ( ), W X = ^! - 3⁄4 (^ 2 ), Wl can be recovered. ,
W W
实现上述性质的基本方法是: 对于 z=l,2, ... (其顺序可任意规定), 不断 把 w//≠0, 经过单向函数的变换后, 加到 上。 仍以图 5为例: 把 w2经过 ¾ 的变换后加到 Wl, 得到 Α, 再把 经过 ¾的变换后加到 w2, 得到 x2, 依此 类推, 实现多层单向函数嵌套的、 可逆的单向函数链。 The basic method for realizing the above properties is: For z = l, 2, ... (the order can be arbitrarily specified), w/ / ≠ 0 is continuously added to the upper side by the transformation of the one-way function. Still take Figure 5 as an example: After w 2 is transformed by 3⁄4 , it is added to Wl to get Α, then transformed by 3⁄4 and added to w 2 to get x 2 , and so on, to achieve multi-layer one-way function nesting. Reversible one-way function chain.
从数学的角度描述本发明的一个优选例子如下:  A preferred example of the invention is described from a mathematical point of view as follows:
(1) ¾iv = (wi, ...,wn), x = (x ...,xm), y =
Figure imgf000015_0002
...,yn), whx yk≡¥, 正整 数 m>n≥ n、 F为规定的域; 设置一个单向函数链, 即设置一个由 w到 x的 映射函数: x = H(w); 该 HO)是用若干个单向函数来实现的、可逆的非线性变 换, 通过运用若干个单向函数 0, 的组合运算, 把 IV扩张为 X; 该
(1) 3⁄4iv = (wi, ..., w n ), x = (x ..., x m ), y =
Figure imgf000015_0002
..., y n ), w h xy k ≡¥, positive integer m>n≥ n, F is the specified domain; set a one-way function chain, that is, set a mapping function from w to x: x = H (w); the HO) is a reversible nonlinear transformation implemented by a number of one-way functions, and the IV is expanded to X by a combination operation using a plurality of one-way functions 0;
HO)等价于 F上的 m个关于 w1 w„的《元稠密多项式函数; 已知 HO)的 算法, 由 X求 w是容易的; HO) is equivalent to the m w on w. 1 "to" meta dense on the polynomial function F.; Known HO) algorithm, find the X w is easy;
(2) 建立函数 R( ): u0(x) = (ηοι(χχ, xm\ ..., η(χχ, ..., xm)) = R(x), 其 用于把 x转换成《个 F上的关于 的多项式函数; (2) Establish the function R( ): u 0 (x) = (η οι (χχ, x m \ ..., η (χχ, ..., x m )) = R(x), which is used Convert x into a polynomial function on the F;
(3) 由 HO、 推导出单向函数链的逆函数, 其满足: (3) Deriving the inverse function of the one-way function chain by HO, which satisfies:
Figure imgf000015_0003
Figure imgf000015_0003
其中, z = (z1 ..., zn) = u0(x)= (uoi(xi, xm\ UQn{Xi, ...,Xm)), Zi≡F, u0i(x )是?上的关于 ..., )的多项式函数, 是函数 ^ C^, 的值; Where z = (z 1 ..., z n ) = u 0 (x)= (uoi(xi, x m \ U Qn {Xi, ..., X m )), Zi≡F, u 0i ( x) Yes? The polynomial function on ..., ) is the value of the function ^ C^,
(4) 把 HO)作为公开的加密算法的一部分, 把《< Λ合成到公钥中的《 个 元函数组中, 把 Η·1)^作为解密算法的一部分, 把 R(x)的计算参数作为私 钥的一部分。 (4) Using HO as part of the public encryption algorithm, "< Λ 到 into the public key" In the elementary function group, Η· 1 )^ is used as part of the decryption algorithm, and the calculation parameter of R(x) is taken as part of the private key.
当运用公钥 Ε' Ο来进行加密的数据处理时:  When using the public key Ε' Ο for encrypted data processing:
首先运用 ΗΟ)把明文 w扩张为中间结果 X, 即计算: x = HO); First use ΗΟ) to expand the plaintext w to the intermediate result X, ie calculate: x = HO) ;
然后运用公钥 Ε' 把 X压缩为密文;, 即计算: j = E' 。  Then use the public key Ε ' to compress X into ciphertext; that is, calculate: j = E' .
下面简单介绍接口函数 R(x):  The following briefly introduces the interface function R(x):
接口函数 主要用于根据 :)得到"个关于 :)的函数, 一 般表示为: u0(x)
Figure imgf000016_0001
R(x);
The interface function is mainly used to get "a function about:" according to :), which is generally expressed as: u 0 (x)
Figure imgf000016_0001
R(x);
其中, 最简单的 R(x)为: 对于/ w = «, 把 :)转换为 的恒 等变换。  Among them, the simplest R(x) is: For / w = «, convert :) to an identity transformation.
在本发明中,接口函数 R(x)的功能可以理解为:把计算单向函数链 X = U(w) 而得到的 个变量 ..., ), 转换为《个关于 ..., )的函数, 从而实现单 向函数链 HO)与公钥 Ε' 的结合, 并把经过单向函数链扩张后的中间结果再 缩小回来。 它的数学描述通常很简单, 例如图 5中, 对于 =3, n=2 , 把 , x2 , x3三个变量, 转换为两个多项式: MQ尸 A+^ , ti02 = x2。 R(x)的信息, 包 括 i¾、 MQ2的函数形式和系数 e3的数值, 均属于非授权用户不应知道的秘密信 息。 当然, 本领域技术人员可以依据 R(x)的特性, 设计出很多种模式, 在此无 法 详述。 In the present invention, the function of the interface function R(x) can be understood as: converting a variable ..., ) obtained by computing a one-way function chain X = U(w) into "one about...," The function, thus achieving the combination of the one-way function chain HO) and the public key Ε', and narrowing down the intermediate result after the expansion of the one-way function chain. Its mathematical description is usually very simple. For example, in Figure 5, for =3, n=2, convert, x 2 , x 3 three variables, convert to two polynomials: M Q corpse A+^ , ti 02 = x 2 . The information of R(x), including the functional form of i3⁄4, M Q2 , and the value of the coefficient e 3 are all secret information that the unauthorized user should not know. Of course, those skilled in the art can design a variety of modes according to the characteristics of R(x), which cannot be detailed here.
本身并不具有可逆性, 但结合 HO)的知识它就可逆了。 即虽然不能 仅从 、 wQ2的值 ^、 来恢复 Α、 x2、 x3 , 但是借助于完全公开的 HO)的知 识 "x3 = H3( 2) ", 以及隐藏在 E(x)中的 R(x)的秘密参数 e3, 可计算出: = ζλ- e3x3 = z\- e3 ¾( ), x2 = z It is not reversible in itself, but it is reversible in combination with HO). That is, although it is not possible to recover Α, x 2 , x 3 from the value of w Q2 , but with the knowledge of fully disclosed HO) "x 3 = H 3 ( 2 ) ", and hidden in E(x) The secret parameter e 3 of R(x) can be calculated as: = ζ λ - e 3 x 3 = z\- e 3 3⁄4 ( ), x 2 = z
采用任何符合本发明公钥属性要求的公钥生成方法完全是可行的,但是优 选的, 本实施例可以通过以下歩骤得到公钥和私钥:  It is entirely feasible to adopt any public key generation method that complies with the public key attribute requirements of the present invention, but preferably, the present embodiment can obtain the public key and the private key by the following steps:
歩骤 a、选取 个域 F上的《元可逆线性变换T = CΓ1, ... , Ti+1:), 其中, 每个 包括《个域 F上的关于 ···, 的 n元线性多项式; Step a: Select the "metainvertible linear transformation T = CΓ 1 , ... , T i+1 :) on the domain F, where each includes the n-element of "··· on the domain F Linear polynomial
歩骤 b、 选取 s个域 F上的《元可逆非线性变换 G = (G1 ... , Ο:), 其中, 每个 包括《个域 F上的关于 的函数; Step b, selecting "metainvertible nonlinear transformation G = (G 1 ... , Ο:) on s fields F, wherein each includes a function on the domain F;
其中, 所述的函数可以包括多项式、 有理分式等各种函数类型, 本发明并 不需要对此加以限制。  Wherein, the function may include various function types such as a polynomial, a rational fraction, and the like, and the present invention does not need to be limited thereto.
歩骤 c、 依据预置规则, 合成所述《() 、 T和 G, 得到从 X到 的非线性 映射函数组: (y1 ...,yn) = E(x) = (El(xl, ...,xm\ ...,En(xu ...,xm)); Step c: synthesizing the "(), T, and G according to a preset rule to obtain a nonlinearity from X to Mapping function group: (y 1 ..., y n ) = E(x) = (E l (x l , ..., x m \ ..., E n (x u ..., x m ) );
合成所述《<) 、 T和 G的目的, 在于将 R 、 T和 G的有关信息嵌入并 隐藏在公钥中, 这些信息均属于非授权用户不应知道的秘密信息。为了达到隐 藏目的, 采用各种预置合成规则都是可行的。 把《« Λ 、 T和 G从 Ε' 中分离 出来非常困难, 需要交替运用因式分解(factorization, 主要针对"乘法")和函 数分解(decomposition, 主要针对"迭代")来分析隐藏在该不定方程组内部的 多层嵌套结构。  The purpose of synthesizing the "<), T, and G is to embed and hide information about R, T, and G in the public key, all of which belong to secret information that the unauthorised user should not know. In order to achieve hidden purposes, it is feasible to adopt various preset synthesis rules. It is very difficult to separate "« 、 , T and G from Ε ', and it is necessary to alternate factorization (factorization, mainly for "multiplication") and function decomposition (decomposition (mainly for "iteration") to analyze the hidden in this uncertainty. A multi-level nested structure inside a system of equations.
歩骤 d、 选取 E(x)中的《'个函数作为 E'(x), 得到公钥; 其中, E'(x)中含 有关于 ( i, ..., )的函数; E'( )= (Ei( i, ...,xm), ...,Ew i, ...,xm)); 把公钥向全 体用户公开; Step d, select "' function as E'(x) in E(x), get the public key; where E'(x) contains a function about (i, ..., ); E'( ) = (Ei( i, ..., x m ), ..., E w i, ..., x m )); disclose the public key to all users;
m>n= n、 即歩骤 f中的选取并不删除函数, 而选取 E(x)中所有的函数 作为 Ε' 。 此时本实施例可以用于加解密和数字签名等各种情况。 When m>n=n , that is, the selection in step f does not delete the function, all functions in E(x) are selected as Ε'. At this time, the embodiment can be used for various situations such as encryption and decryption and digital signature.
m>n> η', 即歩骤 f中采用了舍弃一部分函数的方法, 此时本实施例可 以用于数字签名的情况。 When m>n> η ', that is, a method of discarding a part of the function is employed in the step f, the present embodiment can be used in the case of digital signature.
m=n= n、 此时的安全性能较差; 当 m=n> t , 此时本实施例可以用于 数字签名的情况。 进一歩, 如果本实施例中优选采用接口函数 R(x)实现把 m 个变元, 转换成 n个多项式, 则可以保证 m>n。 当然, 如果依据实际情况需 要 m=n, 则本领域技术人员可以根据各种现有技术得到, 在此就不再详述。 When m=n=n , the security performance at this time is poor; when m=n >t, this embodiment can be used for the case of digital signature. Further, if the interface function R(x) is preferably used in the embodiment to convert m arguments into n polynomials, m>n can be guaranteed. Of course, if m=n is needed according to the actual situation, those skilled in the art can obtain according to various prior art, and will not be described in detail herein.
歩骤 g、 生成 T的逆函数 T—1; 生成 G的逆函数 G—1; 由 T1和 G— 1计算得 到 DO ; 生成私钥, 所述私钥包括 R 和 D0, 把该私钥发给授权用户秘密 保存。 所述私钥中的 R(x)用于同单向函数链的逆函数 H—1 ( 一起将中间结果 z 转换为译码消息 w。 Ho step g, generating inverse function T T- 1; generating an inverse function of G G- 1; T a. 1 and G- 1 calculated the DO; generating a private key, the private key R and comprising D0, the key that Send it to authorized users for secret storage. R(x) in the private key is used for the inverse function H- 1 of the one-way function chain (together the intermediate result z into a decoded message w.
上述歩骤 e中所述的预置规则,可以由本领域技术人员根据实际情况进行 设置即可。  The preset rules described in the foregoing step e may be set by a person skilled in the art according to actual conditions.
优选的, 如果期望得到的 E'(x)中含有关于 的有理分式函数, 则 所述预置规则可以为以下两种情况:  Preferably, if the expected E'(x) contains a rational fractional function, the preset rule may be in the following two cases:
把函数组《Q(x)代入到 , 把1 代入到 把 代入到 T2, 把 Τ2代入 到 G2, ..., 把1}代入到 G, ..., 把! 代入到 Gs, 把(^代入到 Ti+1Substituting the function group " Q (x) into it, substituting 1 into T 2 , substituting Τ 2 into G 2 , ..., substituting 1} into G, ..., put! Substitute into G s and substitute (^ into T i+1 ;
或者, 把函数组 代入到 , 把1 代入到 把 代入到 T2, 把 Τ2代入到 G2, ..., 把 1}代入到 G, ..., 把! 代入到 GsOr, substituting the function group, substituting 1 into T 2 , substituting Τ 2 into G 2 , ..., substituting 1} into G, ..., put! Substitute into G s .
对于上述两种可能的方式而言, 当最后为线性变换 Ti+1时,所得到的有理 分式的公钥, 其每个有理分式的分母多项式是相同的; 当最后为非线性变换 时, 其公钥中每个有理分式的分母多项式通常都不同。 对于工程应用, 默 认相同的分母, 可以节省公钥存储空间(只要存储《 + 1个, 而不是 2«个多项 式), 提高运算速度 (只要计算《 + 1个, 而不是 2«个多项式的值)。 For the above two possible ways, when the last linear transformation T i+1 , the obtained rationality The fractional public key, the denominator polynomial of each rational fraction is the same; when the last is a nonlinear transformation, the denominator polynomial of each rational fraction in the public key is usually different. For engineering applications, the default denominator can save public key storage space (as long as "+1, not 2" polynomial is stored), increase the speed of the operation (as long as the value of "+1, not 2" polynomial is calculated ).
相应的, 针对上述实施例, 本发明还提供了两个装置实施例:  Correspondingly, with respect to the above embodiments, the present invention also provides two device embodiments:
一种用于编码和译码数字消息的系统实施例, 具体可以包括:  A system embodiment for encoding and decoding a digital message may specifically include:
公钥生成单元, 用于生成一包含有 的公钥, 其中, 为在域 F上的 从 ..., )到(^, 的非线性映射函数组, m, "为正整数, m > 并且, 所述 中隐含有接口函数 ,其用于根据 :)得到《个关于 ...,xm) 的函数: Μο(·^)= uoi(xi, ···, ¾), ..., Uo„(Xi, ...,xm) =R( ); a public key generating unit, configured to generate an included public key, where, from (...) to (^, the non-linear mapping function group of the ^, ", is a positive integer, m > and The implicitly contains an interface function for obtaining a function of "a", x m ) according to :): Μο(·^) = uoi(xi, ···, 3⁄4), ... , Uo„(Xi, ..., x m ) =R( );
私钥生成单元,用于生成一与所述公钥相对应的私钥,所述私钥包括 R(x); 单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— a private key generating unit, configured to generate a private key corresponding to the public key, the private key including R(x) ; a one-way function chain determining unit, configured to set a one-way function chain HO), and a one-way The inverse function of the function chain H—
加密单元, 用于通过单向函数链 HO)将消息 w转换为中间结果 X, 然后 采用所述公钥对所述中间结果 X进行编码, 得到编码结果 和  An encryption unit, configured to convert the message w into an intermediate result X by a one-way function chain HO), and then encode the intermediate result X by using the public key to obtain a coding result and
解密单元, 用于采用所述私钥将编码结果 J变换为中间结果 Z, 然后运用 单向函数链的逆函数 H—^)以及私钥将中间结果 z转换为译码消息 w。  And a decryption unit, configured to convert the encoding result J into an intermediate result Z by using the private key, and then convert the intermediate result z into a decoding message w by using an inverse function H—^) of the one-way function chain and a private key.
以及, 一种用于数字签名的系统实施例, 具体包括:  And, a system embodiment for digital signature, specifically includes:
公钥生成单元, 用于生成一包含有 Ε' 的公钥, 所述 Ε' 为在域 F上的 从 到 , ..., j )的非线性映射函数组; 并且, 所述 E'(x)中隐含有接 口函数 R(x), 其用于根据 xra:)得到"个关于 :)的函数: 《( χ) = (u0 (x , ...,xm), ..., u0n(x , ...,xm) =R( ); 其中, m, n, "'为正整数, m >n> r ; a public key generating unit, configured to generate a public key including Ε', which is a non-linear mapping function group of s to ..., j) on the domain F; and, the E' ( x) implicitly contains the interface function R(x), which is used to get a "about:" function according to x ra :): "( 0 ) = (u 0 (x , ..., x m ), . .., u 0n (x , ..., x m ) =R( ); where m, n, "' is a positive integer, m >n>r;
私钥生成单元,用于生成一与所述公钥相对应的私钥,所述私钥包括 R(x); 单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— a private key generating unit, configured to generate a private key corresponding to the public key, the private key including R(x) ; a one-way function chain determining unit, configured to set a one-way function chain HO), and a one-way The inverse function of the function chain H—
签名单元, 用于采用所述私钥先把待签名的消息 /'变换为中间结果 z, 然 后运用单向函数链的逆函数 Η— ;)以及私钥将中间结果 ζ转换为数字签名 IV; 以及  a signature unit, configured to use the private key to first convert the message to be signed/' into an intermediate result z, and then use an inverse function of the one-way function chain ;-; and the private key to convert the intermediate result to a digital signature IV; as well as
验证单元, 用于通过单向函数链 HO)将数字签名 w转换为中间结果 X, 然后采用所述公钥对所述中间结果 X进行译码, 得到译码结果 ^ 比较译码结果 ^和待验证的消息 , 根据比较结果确定数字签名 W是否 正确。 a verification unit, configured to convert the digital signature w into an intermediate result X by a one-way function chain HO), and then use the public key to decode the intermediate result X to obtain a decoding result^ Comparing the decoding result and the message to be verified, it is determined whether the digital signature W is correct according to the comparison result.
下面简单介绍单项函数链的生成:  The following is a brief introduction to the generation of a single function chain:
当然, 建立单向函数链的方法不局限于以下的方法, 而是可以推广到满足 单向函数链功能的各种方法。 本发明仅仅举出一优选实施例进行说明而已。  Of course, the method of establishing a one-way function chain is not limited to the following methods, but can be generalized to various methods that satisfy the function of the one-way function chain. The invention has been described by way of a preferred embodiment.
第一步,建立单向函数链。设置 个单向函数:
Figure imgf000019_0001
..., L, L^(m -n), au a2, ..., β≡¥ρ, 其输入为若干个模;?的整数, 其输出为一个 模;?的整数。单向函数的求逆, 即由其输出求其输入是困难的。用 个单向函 数设置一个单向函数链:
The first step is to build a one-way function chain. Set a one-way function:
Figure imgf000019_0001
..., L, L^(m -n), a u a 2 , ..., β≡¥ ρ , whose input is a number of modules; Integer, whose output is a modulo;? The integer. The inversion of a one-way function, that is, it is difficult to find its input by its output. Set up a one-way function chain with a one-way function:
X = ( ι,…, = H(iv) = H(wi,…, w„),  X = ( ι,..., = H(iv) = H(wi,..., w„),
使得从 IV到 X的映射虽然是复杂的稠密多项式函数, 将其展开、 化简非常困 难, 但对它求逆, 即由 X求 IV却是容易的。 本实施例的具体做法为: Although the mapping from IV to X is a complex dense polynomial function, it is very difficult to expand and simplify it, but it is easy to invert it, that is, it is easy to find IV by X. The specific practice of this embodiment is:
(1)设置函数 (x1 ..., )=1^( , ..., ): (1) Set the function (x 1 ..., ) = 1^( , ..., ):
首先,令 2 = _", 1 = - 2, (xu ...,xn) = (wu ...,wn), 设置指针 1), e{Lx), \^θ{ί)^η·, First, let 2 = _", 1 = - 2 , (x u ..., x n ) = (w u ..., w n ), set the pointer 1), e{L x ), \^θ{ ί)^η·,
然后, 对于
Figure imgf000019_0002
..., , 依次替换:
Then, for
Figure imgf000019_0002
..., , replace in order:
Χθ(ί) (χβ(ί) + ¾( ι , ... , χθ{ί)- 1 , χθ{ί) +ι, ...,xn)) mod ρ。 Χθ(ί) (χβ(ί) + 3⁄4( ι , ... , χ θ{ί) - 1 , χ θ{ί) +ι, ..., x n )) mod ρ.
在本实施例中, 把 θ(ί)设置为从 1到 η的循环。  In the present embodiment, θ(ί) is set as a loop from 1 to η.
(2)设置函数 (x„+1, ...,xm) = K2(x 运用单向函数 ,尸 ...,L, 由 x1 计算出 (2) Set the function (x„ +1 , ..., x m ) = K 2 (x uses a one-way function, corpse..., L, calculated from x 1
在本实施例中的函数 Κ2为:对于
Figure imgf000019_0003
2,依次计算: xi+n = lii+Li(x ))。
The function Κ 2 in this embodiment is: for
Figure imgf000019_0003
, 2 , calculated in turn: x i+n = li i+Li (x ) ).
(3)把上述的 I 、 K2合成为 HO): (3) Combine the above I and K 2 into HO):
x = ...,x„,xn+ ..., ra) = (Ki(wi, ...,wn\ K2(Ki(wi, ...,wn)))0 也就是把 Kl、 K2的计算结果链接起来, 作为 H v)的计算结果。 x = ..., x ", x n + ..., ra) = (Ki (wi, ..., w n \ K 2 (Ki (wi, ..., w n))) 0 is the The calculation results of Kl and K2 are linked together as the calculation result of H v).
第二步, 设置函数《Q(x), 即把 X转换成 n 个关于 X 的多项式《Q(x) =In the second step, set the function " Q (x), that is, convert X into n polynomials about X " Q (x) =
(uoi(x\, ... , xm), ... , u0n(xi, ... , xm)) = R(x) , 满足已知 "0、 R(x)、 HA+1、 …、 ¾, 求 容易; (uoi(x\, ... , x m ), ... , u 0n (xi, ... , x m )) = R(x) , satisfying the known " 0 , R(x), H A +1 , ..., 3⁄4, easy to find;
在本实施例中的函数 R(x)的算法为: 令《0= ^, ...,jg, ex=.. =en=\, 随机 选择 em≡¥p;规定指针 η(ί), ι= η+\, m, \^η(ί)^η,但是 η(ί)≠θ(Ι^·' 依次替换: The algorithm of the function R(x) in this embodiment is: Let "0=^, ..., jg, e x =.. =e n =\, randomly select e m ≡¥ p ; specify the pointer η ( )), ι= η+\, m, \^η(ί)^η, but η(ί)≠θ(Ι^·' Replace in order:
¾ ) ( ¾ ) + etXj) mod p. ¾) (¾) + etXj) mod p.
第三步, 推导出单向函数链的逆: ιν = ^,...,Ο = Η—¾)  The third step is to derive the inverse of the one-way function chain: ιν = ^,...,Ο = Η—3⁄4)
两足: Two feet:
Figure imgf000020_0001
Figure imgf000020_0001
在本实施例中的 H— )的算法为: 首先, 对于 z' = , ...,«+1, 依次替换: ('■) <― (¼■) - ei Hi— "+A (¾)))腸 dp; The algorithm of H-) in this embodiment is: First, for z' = , ..., «+1, replace in order: ('■) <― (1⁄4■) - e i H i- "+A (3⁄4))) intestinal dp;
然后, 对于 z= , ..., 1, 依次替换: Then, for z= , ..., 1, replace in order:
ζβ{ί) (ΖΘ(Γ) - ¾(ζι , ... , z0(i)- 1 , ζθ(ί) +ι, ...,ζη) mod^; Ζβ{ί) (ΖΘ(Γ) - 3⁄4(ζι , ... , z 0(i) - 1 , ζ θ(ί) +ι, ...,ζ η ) mod^;
最后, ^(wi, ..., wn) = (zi, ..., Zw)o Finally, ^(wi, ..., w n ) = (zi, ..., Z w )o
第四步,把 HO)、 H—1^作为密码算法公开发布,而把 R(x)的算法参数(例 如 , :)作为私钥的一部分, 配发给授权用户秘密保存。计算 Η·1^需要这 些参数。 In the fourth step, HO) and H- 1 ^ are publicly released as cryptographic algorithms, and the algorithm parameters (for example, :) of R(x) are distributed as part of the private key to the authorized user for secret preservation. Calculating Η· 1 ^ requires these parameters.
所述 Ε' 中含有的关于 ^, ...,xra:)的函数形式可以为多项式, 优选的, 可 以为多项式和有理分式的组合, 或者全部由有理分式组成。 The functional form of the ^, ..., x ra :) contained in the Ε' may be a polynomial, and preferably, may be a combination of a polynomial and a rational fraction, or all of the rational fractions.
与多项式相比, 有理分式具有显著增大的加密函数规模。 为了便于分析, 把有限域 上的有理分式转换为等价的多项式。 例如, 设本发明的公钥的次 数为 2, 把它转换成多项式的表示形式:  Compared to polynomials, rational fractions have a significantly increased size of the encryption function. For ease of analysis, the rational fraction on the finite field is converted to an equivalent polynomial. For example, let the number of times the public key of the present invention is 2, and convert it into a polynomial representation:
Figure imgf000020_0002
Figure imgf000020_0002
hl+...+hM≤2{p-2) h l+ ...+h M ≤2{p-2)
Xi, y (Ά, βϋ, Yijk bi · FP, m>n, 1 ί^η·, 其项的数量将由 ¾+2 = ,增加到大约
Figure imgf000020_0003
= ¾¾¾。例如,当 p w = 2时: ι + χχ +χ2 + 2χχχ2 + 3x2 2f mod 5
Figure imgf000021_0001
+ 3x2 + 2x\2x2 + + i4 2 + i5 2 + 2x2 2 + i 2 2 +
Figure imgf000021_0002
X2 + 4 2 3 + 4 i 2 3 + 4 i2 2 3 + 4 i¾3 + Xi + 4 i 2 4 + 3 i2 2 4 + 2 5 + 4 i 2 5 + 2 2 6) mod 5
Xi, y (Ά, β ϋ , Yi jk b i · F P, m> n, 1 ί ^ η ·, the number of items which will ¾ +2 =, increased to about
Figure imgf000020_0003
= 3⁄43⁄43⁄4. For example, when pw = 2: ι + χχ +χ 2 + 2χχχ 2 + 3x 2 2 f mod 5
Figure imgf000021_0001
+ 3x 2 + 2x\ 2 x 2 + + i 4 2 + i 5 2 + 2x 2 2 + i 2 2 +
Figure imgf000021_0002
X2 + 4 2 3 + 4 i 2 3 + 4 i 2 2 3 + 4 i3⁄4 3 + Xi + 4 i 2 4 + 3 i 2 2 4 + 2 5 + 4 i 2 5 + 2 2 6 ) mod 5
= (3 + 3 i + 3 i + 2 + 4x2 + 2 i 2 + i 2 + i 2 + + 4 i 2 += (3 + 3 i + 3 i + 2 + 4x 2 + 2 i 2 + i 2 + i 2 + + 4 i 2 +
4xi
Figure imgf000021_0003
mod 5;
4xi
Figure imgf000021_0003
Mod 5;
而当; ?=65537, =8时, 这种等价于有理分式的多项式的项的数量, 将由 MQ时的 (¾+2=45, 大约增加到 And when ;==65537, =8, the number of terms equivalent to the polynomial of the rational fraction will be increased by (3⁄4 +2 =45, approximately
^2(n-2) (8 + 2(65537-2))!  ^2(n-2) (8 + 2 (65537-2))!
U 2) = 81(2(65537-2))! = 216085265358661721640525505904640; 显然, 规模如此巨大的多项式, 虽然在数学世界中是客观存在的, 但需要 占用指数级的存储空间, 实际上是难以操作的。 这种性质的有益效果为: 把 MQ的二次稀疏多项式提升为高次稠密多项式,使等价于公钥的多项式函数的 规模发生爆炸, 从本质上提高了求不定方程组的逆函数的困难性, 从而显著增 加抗破译能力。 U 2) = 81(2(65537-2))! = 216085265358661721640525505904640 ; Obviously, a polynomial of such a large size, although objectively present in the mathematical world, requires an exponential storage space, which is actually difficult Operational. The beneficial effects of this property are: Promoting the quadratic sparse polynomial of MQ to a higher-order dense polynomial, exposing the scale of the polynomial function equivalent to the public key, essentially improving the difficulty of finding the inverse function of the indefinite system of equations. Sex, which significantly increases the ability to resist deciphering.
下面对单向函数链能够为编码译码过程带来的益处进行分析,以加解密和 可恢复的签名过程为例进行说明。  The following is an analysis of the benefits of the one-way function chain for the coding and decoding process, taking the encryption and decryption and recoverable signature process as an example.
当 >«=«'时, Ε' = Ε(Λ , 已知密文 (或待签名的数据;), 破译明文 (或关于数据 ^的签名) w, 先要求中间结果 X, 这种情况相当于解不定方程 组:  When >«=«', Ε' = Ε(Λ , known ciphertext (or data to be signed;), deciphering plaintext (or signature on data ^) w, first request intermediate result X, this case is equivalent In the indefinite equations:
(yi, ...,y„) = (Ει( ι, ...,xm\ ...,Ew( i, ...,xm)) 其变元数量 大于方程式数量《, 符合上述方程组的 X的解很多, 表现为一个 巨大的解集。但是, 把单向函数链与上述方程组放在一起, 组成一个关于未知 元 w的联立方程组: (yi, ..., y„) = (Ει( ι, ...,x m \ ...,E w ( i, ...,x m )) The number of arguments is greater than the number of equations, The solution of X of the above equations is many, and it appears as a huge solution set. However, the one-way function chain is put together with the above equations to form a simultaneous equation system about the unknown element w:
(wl,...,wn) = Yi(yl,...,ym) 其中, 单向函数链由若干个含有单向函数变换的方程式组成, 例如对于说明书 中 =3、 n=2、 只有三个单向函数 、 ¾、 ¾的情况: (Λ·λ3琳釾軍 '¾骈 ¾¥^?¾ ¾ 睇 ^ ¾ ¾观^担丄 (w l ,...,w n ) = Yi(y l ,...,y m ) where the one-way function chain consists of several equations containing a one-way function transformation, for example, in the specification =3, n = 2, only three one-way functions, 3⁄4, 3⁄4: (Λ·λ3琳釾军'3⁄4骈3⁄4¥^?3⁄4 3⁄4 睇^ 3⁄4 3⁄4观^
。 敏琳 '^ M ^ a  . Min Lin '^ M ^ a
令^ ¾ °¾窬 百^:¾ ^篛鮮 ¾®¾ ^ nmmm m  令^ 3⁄4 °3⁄4窬 百^:3⁄4 ^篛鲜 3⁄4®3⁄4 ^ nmmm m
靠翻 '^mmrn^ ^ -i^ ^T ^^ ^ ai ra '^Μ®^·#¾ By turning '^mmrn^ ^ -i^ ^T ^^ ^ ai ra '^Μ®^·#3⁄4
^ ^
Figure imgf000022_0001
Figure imgf000022_0001
+ ((((^)¾ + τ^)¾ + ζ^)£ΐύ (((^)¾ + + + ((((^)¾ + τ^)¾ + ^)¾) + ((((^) ¾ + τ ^) ¾ + ζ ^) £ ΐύ (((^) ¾ + + + ((((^) ¾ + τ ^) ¾ + ^) ¾)
((¾ )¾ + IM)†7 + ((((^)¾ + τ^)¾ + ^)¾)6 + r(((^)¾ + τ^)¾ + Ζ^)Π + (((^)¾ ((3⁄4 )3⁄4 + IM)†7 + ((((^)3⁄4 + τ ^)3⁄4 + ^)3⁄4)6 + r (((^)3⁄4 + τ ^)3⁄4 + Ζ ^)Π + (( (^)3⁄4
+ ^)¾ +¾ )((¾ )¾ + 1^)6 + (((^)¾ + +Ζ^)Π + r((^)¾ + + ((^)¾ + ^)3⁄4 +3⁄4 )((3⁄4 )3⁄4 + 1 ^)6 + (((^)3⁄4 + + Ζ ^)Π + r ((^)3⁄4 + + ((^)3⁄4
+ T^)ei + ^i)/Q((((^)¾ + τ^)¾ + ^)¾)^ + ((((^)¾ + τ^)¾ + ^)¾)(((^)¾+ T ^)ei + ^i)/Q(((^^3⁄4 + τ ^)3⁄4 + ^)3⁄4)^ + ((((^^3⁄4 + τ ^)3⁄4 + ^)3⁄4)((( ^)3⁄4
+ + ¾ )£ + ((((¾1)¾ + + ΖΜ)¾) ((¾1)¾ + + ((((^)¾ + Τ^)¾ ζ\+ + 3⁄4 )£ + ((((3⁄41)3⁄4 + + Ζ Μ)3⁄4) ((3(41)3⁄4 + + (((^^3⁄4 + Τ ^)3⁄4 ζ\
+ Ζ^)£ΐί)ζ\ + r(((^)¾ + T^)¾ + + (((^)¾ + Τ^)¾ + ¾ί)((¾ )¾ + Τ^)θΐ + Ζ ^) £ ΐί) ζ \ + r (((^) ¾ + T ^) ¾ + + (((^) ¾ + Τ ^) ¾ + ¾ί) ((¾) ¾ + Τ ^) θΐ
+ (((¾ )¾ + τ^)¾ +^)θΐ +r((^)¾ +^)6 + ((^)¾ +^)9ΐ + 6)) = + (((3⁄4 )3⁄4 + τ ^)3⁄4 +^)θΐ + r ((^)3⁄4 +^)6 + ((^)3⁄4 +^)9ΐ + 6)) =
L\ poiu + £xzx + £xTx†7 + £x + yfrl + ¾ 6 + Z^ \ + + ¾ΐ + Π)/(ζ + +L\ poiu + £ x z x + £ x T x†7 + £ x + yfrl + 3⁄4 6 + Z ^ \ + + 3⁄4ΐ + Π)/( ζ + +
Figure imgf000022_0002
Figure imgf000022_0002
(((((¾ )¾ + Τ^)¾ + ^)¾) '(((^)¾ + Τ^)¾ + '((^)¾ + T^))T3 = ((((3(4)3⁄4 + Τ ^)3⁄4 + ^)3⁄4) '(((^)3⁄4 + Τ ^)3⁄4 + '((^)3⁄4 + T ^)) T 3 =
nm '¥a °te、i ¾ f¾游璨 齑 ^舊^ '^ ^^ -i^ ^Nm '¥a °te, i 3⁄4 f3⁄4 游 璨 ^老^ '^ ^^ -i^ ^
'¾湯鮮 f¾te、l WJlYJl¾¾骈来爾鮮^ ^^璨 ί¾·#^Ψ^— ¾ '3⁄4汤鲜f3⁄4te, l WJlYJl3⁄43⁄4骈尔尔鲜^ ^^璨 ί3⁄4·#^Ψ^— 3⁄4
' m。娜一 *暴 M本 ¾g 'm. Na Yi *Violence M Ben 3⁄4g
Figure imgf000022_0003
Figure imgf000022_0003
-02-  -02-
1?9Ζ0.0/.00ΖΝ3/Χ3«Ι 为公钥进行说明。 详细歩骤如下: 1?9Ζ0.0/.00ΖΝ3/Χ3«Ι Explain the public key. The detailed steps are as follows:
第一步、 建立单向函数链 HO)  The first step is to build a one-way function chain HO)
首先, 设置密码算法的结构。 例如设 F为有限域 F> /?为素数, 正整数 "'并且 w〉"'。 设
Figure imgf000023_0001
…., zn), ^,x,,j^eF。
First, set the structure of the cryptographic algorithm. For example, let F be a finite field F> /? Is a prime number, a positive integer "' and w>"'. Assume
Figure imgf000023_0001
...., z n ), ^, x,, j^eF.
建立单向函数链: x = H(w), 其运用若干个单向函数 HO ...,¾◦的组合 运算, 把 w转换为 X, 该 HO)是一个足够复杂的、 可逆的非线性变换;  Establish a one-way function chain: x = H(w), which uses a combination of several one-way functions HO ..., 3⁄4◦ to convert w to X, which is a sufficiently complex, reversible nonlinearity Transform
建立接口函数 R(x): u0(x) = ( 0i(xi, ... , ... , 0n(x ... , xm)) = R(x), 其把 x转换为《个关于 xi, ..., 的函数; Establish interface function R(x): u 0 (x) = ( 0i (xi, ... , ... , 0n (x ... , x m )) = R(x), which converts x to a function about xi, ...,
由 HO、 推导出单向函数链的逆: w = H— ^z), 其满足:  From HO, derive the inverse of the one-way function chain: w = H - ^z), which satisfies:
w =
Figure imgf000023_0002
= H ( R( HO))) ;
w =
Figure imgf000023_0002
= H ( R( HO))) ;
把 HO)作为公开的密码算法的一部分, 把 作为私钥的一部分, 计算 Use HO) as part of the public cryptographic algorithm, as part of the private key, to calculate
H— 需要使用 R(x)。 H—Requires the use of R(x).
第二步、 建立密码参数 T、 G  The second step, establish password parameters T, G
随机选择 个 F上的《元线性变换 Τ, 其中, 每个《元线性变换 由 n 个 F上的关于 %的《元线性多项式组成:  Randomly select the "metalinear transformation Τ" on F, where each "metalinear transformation consists of n meta-polynomials on % of F on %:
T = (T1; ...,Ti+1), 其中:
Figure imgf000023_0003
T = (T 1; ..., T i+1 ), where:
Figure imgf000023_0003
βί = Ty(ori, On) = bij0 + byi ax + bij2a2 + ... + bijnOn, Ίί = Ty(ori, On) = bij 0 + byi a x + b ij2 a2 + ... + b ijn On,
然后, 推导出 T的逆函数 T1, 即分别推导出上述的 1个《元线性变换 的逆变换, 其中, 每个逆变换 IV1由《个 F上的关于 Α, ...,βη的 η元线性多项 式组成: Then, the inverse function T 1 of T is derived, that is, the above-mentioned inverse transformation of the meta-linear transformation is respectively derived, wherein each inverse transformation IV 1 is derived from "F on F, ..., β η The η-ary linear polynomial consists of:
Τ"1 = (ΤΓ1, ...,Ts+ 1), 其中: Ti' = Tn ,
Figure imgf000023_0004
···, ")),
Τ" 1 = (ΤΓ 1 , ..., T s+ 1 ), where: Ti' = Tn ,
Figure imgf000023_0004
···, ")),
Oj = Ty ^l, ... , A) = C≠ + Ciji x + Cy2y¾ +… + Cijn n, 随机选择 s个 F上的《元可逆非线性变换 G, 每个 n元可逆非线性变 由 w个 F上的关于 On的函数组成: Oj = Ty ^l, ... , A) = C ≠ + Ciji x + Cy 2 y3⁄4 +... + C ijn n , Randomly select the "metainvertible nonlinear transformation G" on s F, each n-ary reversible nonlinear transformation consists of functions on On on w F:
G = (Gb ...,GS), 其中: G = (G b ..., G S ), where:
= (Gn( ..., %), ..., Gin( ...,%)), = (G n ( ..., %), ..., G in ( ...,%)),
Figure imgf000024_0001
Figure imgf000024_0001
然后, 推导出 G的逆函数 G—1, 即分别推导出上述的 个《元可逆非线性 变换的逆变换,其中,每个逆变换 由《个 F上的关于 , ...,βη的函数组成: Then, the inverse function G- 1 of G is derived, which is the inverse of the above-mentioned inverse transformation of the elementary reversible nonlinear transformation, where each inverse transformation is composed of "F on, F, ..., β η Function composition:
-1  -1
G- 1 = (G1-1, ...,Ο 1), 其中: G- 1 = (G 1 - 1 , ..., Ο 1 ), where:
Figure imgf000024_0002
Figure imgf000024_0002
EF, Ι Ά, EF , Ι Ά,
所述的 Τ、 G、 G—1的具体实现方法均为公知技术, 在此不进行详述。 第三步、 把函数组《« Λ 、 T、 G合成为 E(x), 建立公钥 Ε' The specific implementation methods of the above-mentioned Τ, G, G- 1 are well-known technologies, and will not be described in detail herein. The third step is to synthesize the function group «« 、 , T, G into E(x), and establish a public key Ε '
把所述的《<) 、 T、 G合成为 F上的 个输入、 《个输出的非线性变换: E(x) = Ts+l(Gs(Ts( ... G/T/ ... G2(T2(G1(T10( ))))) ···))···)))' 即把函数组《« χ)代入到 , 把1 代入到 把。代入到 T2, 把 Τ2代入到 G2, …, 把 1}代入到 G, …, 把! 代入到 Gs, 把(^代入到 Ti+1。 在合成过 程中也可以不使用线性变换 Ti+1。 把 E(x)展开、 化简后, 得到《个?上的 元函数:
Figure imgf000025_0001
Combine the above "<), T, G into an input on F, "a nonlinear transformation of the output: E(x) = T s + l (G s (T s ( ... G/T/ ... G 2 (T 2 (G 1 (T 10 ( )))))···))···································· Put it. Substituting into T 2 , substituting Τ 2 into G 2 , ..., substituting 1} into G, ..., put! Substituting into G s , substituting (^ into T i+1 . In the synthesis process, you can also not use the linear transformation T i+1 . After E (x) is expanded and simplified, the metafunction on the root is obtained:
Figure imgf000025_0001
UjO,kl...km A\ - --Am U jO,k l ...k m A \ - -- A m
并且在 7T1Q, 7Γ20,..., ,Q中至少有一个 1, 即它们之中至少有一个是有理分 把 E'(x)规定为 E(x)中的《'个函数 And at least one of 7T 1Q , 7Γ 20 ,..., , Q , that is, at least one of them is a rational function that defines E'(x) as the ''function in E(x)
E'(x) = (E^, ., £ E(x), 则: (y1 ...,_¼,) = £»是?上的关于 1, ..., 的/ 元不定方程组; E'(x) = (E^, ., £ E(x), then: (y 1 ..., _1⁄4,) = £» is the / indefinite equations for 1 , ..., ;
把 Ε' 作为公钥。  Use Ε' as the public key.
第四步、 把!11、 G—1合成为 DO), 建立私钥 {DO ,R(x)} The fourth step, put! 11 , G- 1 is synthesized as DO), and the private key {DO, R(x)} is established.
把 T- G1合成为 F上的《个输入、 η个输出的变换,其由《个关于 , _y„的《元函数组成: Combine T-G 1 into the transformation of "input, η output" on F, which consists of "the metafunction of "about, _y":
O( ) = (Di(yb ...,yn), ...,On(yu ...,yn)), O( ) = (Di(y b ..., y n ), ..., O n (y u ..., y n )),
该 DO可以采用各种函数表示形式:既可用展开、化简之后的《个函数式 来表示, 也可直接用!11、 G— 1来表示, 还可用其它函数形式来表示; The DO can take a variety of function representations: it can be represented by a function or a simplification, or it can be used directly! 11 , G- 1 to indicate that it can also be represented by other functional forms;
把 {DO , R(x)}作为私钥;  Use {DO , R(x)} as the private key;
第五步、 进行加密与解密、 数字签名与验证  Step 5, encrypt and decrypt, digitally sign and verify
设经过单向函数变换以后的被签名的数据为;=(^, ...,yn 待验证的数据 为 y = ( 'I, ..., "); Let the signed data after the one-way function transformation be; =(^, ..., y n the data to be verified is y = ( 'I, ..., ");
若《 = «', 即
Figure imgf000025_0002
本发明既能实现加密, 也能实现可恢复数据 的签名, 其方法为:
If " = «', ie
Figure imgf000025_0002
The invention can realize both encryption and signature of recoverable data by:
运用公钥 Ε' 进行加密或验证数字签名时, 把明文 w、 或数字签名 w, 转换成密文;、 或数据;, 其计算方法为: j = E' = E'(H( X), 如果 则接受签名, 否则拒绝签名;  When using the public key Ε' to encrypt or verify the digital signature, the plaintext w, or the digital signature w, is converted into ciphertext; or data; the calculation method is: j = E' = E'(H( X), If you accept the signature, otherwise reject the signature;
运用私钥 {DO ,R }进行解密或产生数字签名时, 把密文;、 或数据;, 转换成明文 w、 或数字签名 w, 其计算方法为: w=H— ;)=H— ^DO );  When the private key {DO , R } is used for decryption or digital signature generation, the ciphertext; or data; is converted into plaintext w, or digital signature w, and the calculation method is: w=H— ;)=H— ^ DO );
若《〉《', 即 E'(x)cE(x)时, 本发明只能实现不可恢复数据的签名, 不能 实现加密, 其方法为: 运用私钥 {DO ,R }产生数字签名时, 把数据;, 转换成数字签名 IV, 其 计算方法为: w
Figure imgf000026_0001
);
If ">", that is, E'(x)cE(x), the present invention can only realize the signature of the unrecoverable data, and the encryption cannot be implemented. The method is as follows: When the private key {DO , R } is used to generate a digital signature, the data;, is converted into a digital signature IV, and the calculation method is: w
Figure imgf000026_0001
);
运用公钥 E'(x)验证数字签名时, 其计算方法为: j ) = E'( ) = E'(HO)), 如果 (^, ...,3ν) = 0 , ..., «'), 则接受签名, 否则拒绝签名。  When using the public key E'(x) to verify the digital signature, the calculation method is: j) = E'( ) = E'(HO)), if (^, ..., 3ν) = 0, ..., «'), accept the signature, otherwise reject the signature.
下面介绍一些上述具体实现过程中的诀窍性信息:  The following describes some of the above-mentioned specific implementation process:
优选的建立 Τ的方法是: 随机设置由 个 ^上《阶可逆方阵组成的方 阵组 ={ , ...,Α+1}, 其逆为 ^μΛ ...,Α+r1}, 以及由 s+i个 上"阶 向量组成的向量组 β
Figure imgf000026_0002
The preferred method of establishing Τ is: randomly setting a square matrix consisting of a series of reversible square matrices = { , ..., Α +1 }, the inverse of which is ^μΛ ..., Α+r 1 } And a vector group consisting of s+i upper order vectors
Figure imgf000026_0002
Figure imgf000026_0003
ι = 0, s。这种 "线性变换", 对于有理分式中多项式来说, 当分式的加法需要通分时,将使该多项式的次数增加, 应理解为一种非线性变 换。
Figure imgf000026_0003
ι = 0, s. This kind of "linear transformation", for a polynomial in a rational fraction, when the addition of fractions requires a generalization, the number of times of the polynomial will be increased, which should be understood as a nonlinear transformation.
优选的建立 G的方法是: 预先建立一个足够大的函数库; 以后在需要时, 从该库中随机抽取若干个简单函数, 按照一定规则组合成复杂的加解密函数。  The preferred method for establishing G is: pre-establishing a large enough function library; later, when needed, randomly extracting a number of simple functions from the library and combining them into complex encryption and decryption functions according to certain rules.
其中,优选的建立函数库的方法是:选择若干种不同类型的、其自变量数 目不超过《、 并对于其最后一个自变量可逆的、 ^上的多项式函数或有理分式 函数, 按其自变量数目划分成《个类  Among them, the preferred method of building a function library is to select several different types of polynomial functions or rational fractional functions whose number of independent variables does not exceed ", and is reversible for its last independent variable, according to its The number of variables is divided into "classes"
S= { S1 ...,S„}, 其中: S= { S 1 ...,S„}, where:
Si = {β= G(y)(ori, t), Od = G{ij)'x ( u ... , θα,β), _/ =1, 2,… }, Si = {β= G ( y)(ori, t), Od = G {ij) ' x ( u ... , θα, β), _/ =1, 2,... },
<¾, β≡Έρ, i =1, ...,η, 上式中的 G(y)、 G(y)-1表示自变量数目为 z、 在 中的编号为 j的- 对互逆的函 数。 例如: 对于 z=l, 在该函数库中 Si至少可建立两条记录 (设 <3⁄4, β≡Έ ρ , i =1, ..., η, G( y ), G(y) - 1 in the above equation, the number of independent variables is z, and the number in the middle is j - pair The inverse function. For example: For z=l, at least two records can be created in the function library.
G(ii): . G(ii): .
G(i2): ;G(i 2) : ;
Figure imgf000026_0004
Figure imgf000026_0004
对于 z=2, 在函数库中 S2至少可建立 4条记录: For z=2, at least 4 records can be created in S 2 in the function library:
G(2i): β= ( axOi + .G(2i): β= ( axOi + .
Figure imgf000026_0005
mod p a, = mod p;
Figure imgf000026_0005
Mod pa, = mod p;
, (22) ta, +t, tx x + 1, , (22) ta, +t, t xx + 1,
(23): β二 mod p (23) , mod p .  (23): β 2 mod p (23) , mod p .
βΤ  Τ
G, (24): β = ^χ(Χχ + 2 mod p, G, a. = J- -—— - mod p .G, (24): β = ^ χ(Χχ + 2 mod p, G, a. = J - -—— - mod p .
, . (24)  , . (twenty four)
 ,
建库完成后,还要分析其每种函数的性质、其若干函数的不同组合的性质、 以及其最佳使用方式, 制定出自动生成密码算法方案的规则和策略, 并编写出 实现这些规则和策略的软件。  After the database is built, the nature of each function, the nature of its different combinations of functions, and its best use are analyzed. The rules and strategies for automatically generating the cryptographic algorithm are developed, and the rules are implemented. Strategy software.
进一步, 运用上述的函数库建立 G的方法是: 对于 z=l, s, 为每水 从函数库 S的《个类 s1 s„中分别随机选出一对互逆的函数: Further, the use of the above-described method of establishing a library of G is: for z = l, s, were randomly selected for each water reciprocal pair of functions from the function library S "classes s 1 s" in:
G={Gb ...,Gsj, 其中: G, = (Gn(1), ...,GM G={G b ..., G s j, where: G, = (G n(1 ), ..., G M
G' = {G ,…, G }, 其中: G," = (Gn(i)" ,…, ),  G' = {G ,..., G }, where: G," = (Gn(i)" ,..., ),
G , Gy() E S/,  G , Gy() E S/,
上式中的 G 、 Gm ■i厶分、别表示其自变量数目为 ^ 并对于其; 个自变量可 In the above formula, G, G m ■i厶, not the number of its independent variables is ^ and for it;
-1  -1
逆、 在。、 G 的第 z个函数向量中的第 个函数。 这种类型的 G的优点是: 在加密过程中, 各函数之间是独立的, 后一次计算不需要引用前一次计算的结 果; 但在解密过程中, 后一次计算要引用前一次计算的结果, 使得解密函数比 加密函数复杂, BP: 第 z层的加密函数向量 为: Reverse, in. , the first function in the zth function vector of G. The advantages of this type of G are: In the encryption process, the functions are independent, the latter calculation does not need to refer to the result of the previous calculation; but in the decryption process, the latter calculation refers to the result of the previous calculation. , making the decryption function more complicated than the encryption function, BP: The z-layer encryption function vector is:
Ui2 = G/2(2)(Vn, ), Ui2 = G/2(2)(Vn, ),
Uin = GS(2)(Vn, Vi2, ―., Vin), U in = G S (2)(Vn, V i2 , ―., V in ),
而第 i层的对应的解密函数向量 G 1的函数规模却发生了爆炸:
Figure imgf000027_0001
The function scale of the corresponding decryption function vector G 1 of the i-th layer has exploded:
Figure imgf000027_0001
Vin = Gin{n) (¼1, ^―, Uin) Vin = Gin{n) (1⁄41, ^―, U in )
= Gin(n) l{ G/i(l)
Figure imgf000027_0002
Uin)。 其他问题说明:当求有理分式的值时,可能会遇到虽然分母不是 0多项式、 但分母多项式作为函数的值为 0、从而导致加解密发生错误。虽然其概率很小, 仍应采取必要的容错或纠错措施。
= Gin(n) l { G/i(l)
Figure imgf000027_0002
U in ). Other problem explanation: When seeking the value of the rational fraction, you may encounter that although the denominator is not a polynomial of 0, but the value of the denominator polynomial as a function is 0, resulting in an error in encryption and decryption. Although the probability is small, the necessary fault tolerance or corrective measures should be taken.
参照图 4, 下面对 H(x)、 R(x)与 H— 的关系进行简单说明:  Referring to Figure 4, the following briefly describes the relationship between H(x), R(x) and H-:
在建立公钥过程中, HO)属于公开的密码算法, 隐藏在函数组 E 之中, 把 R(x)以及 T、 G从 E(x)中分离出来是困难的;  In the process of establishing a public key, HO) belongs to the public cryptographic algorithm, hidden in the function group E, and it is difficult to separate R(x) and T, G from E(x);
在建立私钥过程中, 用了 G—1建立 D0 ,密文 经过 DO得到中间结果 z, 也就是加密时的函数组《ο 的值: In the process of establishing the private key, G- 1 is used to establish D0, and the ciphertext is obtained by DO to obtain the intermediate result z, that is, the value of the function group "ο when encrypting:
Ζ = (Ζ\, .— = llo(x) = ( o\(X\,… , Xm),… , ¾0«( 1,… ,  Ζ = (Ζ\, .— = llo(x) = ( o\(X\,... , Xm),... , 3⁄40«( 1,... ,
但是, 进一歩的解密计算则需要把对 H ^和 的求逆过程看作为一个 整体, 需要在两者相互配合下建立一个总的逆函数: ιν = Η· :>。其原因: 在从 的输出 ζ反推 的输入 X的过程中, 既要使用 自己的参数, 也要使 用单向函数链 ΗΟ), 而仅仅运用 R(x)不能把 ζ变换成 x。 所以规定 Η· )是由 Ζ到 w的直接变换,并且在计算 Η·1 时需要使用 R(x)的参数, Η· )满足: w =
Figure imgf000028_0001
= H ( R( HO)))。
However, the further decryption calculation needs to consider the inversion process of H ^ and as a whole, and it is necessary to establish a total inverse function with the cooperation of the two: ιν = Η· :>. The reason: In the process of input X from the output ζ reverse, the use of its own parameters, but also use the one-way function chain ΗΟ), and only use R (x) can not transform ζ into x. So the rule Η· ) is a direct transformation from Ζ to w, and the parameter R(x) needs to be used when calculating Η· 1 , Η· ) satisfies: w =
Figure imgf000028_0001
= H ( R( HO))).
R 的参数(包括函数形式和系数)是私钥的一部分, 将由授权用户秘密 保存。  The parameters of R (including function form and coefficients) are part of the private key and will be kept secret by the authorized user.
为更清楚地表述实施例的具体实施方式, 下面描述一个小数据的例子, 如 图 5、 图 6所示, 其中, 虚框 501表示采用单向函数链 x=HO进行处理的过 程, 虚框 502表示采用公钥 E'(x)进行处理的过程; 虚框 601表示采用私钥 z = DO进行处理的过程, 虚框 602表示采用逆函数 H— 及私钥的秘密参数 63进 行处理的过程。 For a more detailed description of the specific embodiments of the embodiment, an example of a small data is described below, as shown in FIG. 5 and FIG. 6, wherein the virtual box 501 represents a process of processing by using a one-way function chain x=HO, a virtual frame. 502 represents the process of processing using the public key E'(x); the dashed box 601 represents the process of processing with the private key z = DO, and the dashed box 602 represents the processing of the secret parameter 6 3 using the inverse function H_ and the private key. process.
设 F为有限域 F ;?=17, n=n,=2, m=3, s=\, H1; ¾, ¾为 3个单向函数, 为便于验证, 假定其算法为 (^ = ¾(» = ¾(^= modl7, 函数 R(x)的参 数 e3=2, 设置单向函数链 HO)的算法为: Let F be the finite field F; ?=17, n=n , =2, m=3, s=\, H 1; 3⁄4, 3⁄4 are 3 one-way functions. For the sake of verification, the algorithm is assumed to be (^ = The algorithm for 3⁄4 (» = 3⁄4(^= modl7, the parameter e 3 =2 of the function R(x), setting the one-way function chain HO) is:
X\ = (w\ + Hi(w2) ) mod p = (w\ + w2 ) mod p, x2 = (w2 + H2( i) ) mod p = (w2 + X\ ) mod p = (w2 + (w\ + w2 ) ) mod p, X\ = (w\ + Hi(w 2 ) ) mod p = (w\ + w 2 ) mod p, x 2 = (w 2 + H 2 ( i) ) mod p = (w 2 + X\ ) mod p = (w 2 + (w\ + w 2 ) ) mod p,
3 3 3 3 3 3
3= H3( 2) = Xi mod p = (w2 + X\ ) mod p = (w2 + (w\ + w2 ) ) mod ρ·, 其线性变换 T、 T1 (用 ,β表示) 和非线性变换 G、 G— 1分别为:
Figure imgf000029_0001
3= H 3 ( 2 ) = Xi mod p = (w 2 + X\ ) mod p = (w 2 + (w\ + w 2 ) ) mod ρ·, whose linear transformation T, T 1 (represented by β) And the nonlinear transformation G, G- 1 are:
Figure imgf000029_0001
B 1 - ^ll b12)=(l,2), B2= (b2l, b22)=(5,7), B 1 - ^ll b 12 )=(l,2), B 2 = (b 2l , b 22 )=(5,7),
1  1
G11(1): un =― mod 17, G12(2): ul2 =— modl7 G 11(1) : u n =― mod 17, G 12(2) : u l2 =— modl7
v\2  v\2
G11(1)- 1: vn =— mod 17, G12(2)- 1: vxl =― mod 17 运用上述参数推导出 Ε' = Ε( ): oi = (χ\ + e3 Χ3) mod p, G 11(1) - 1 : v n =— mod 17, G 12(2) - 1 : v xl =― mod 17 Use the above parameters to derive Ε' = Ε( ): oi = (χ\ + e 3 Χ3 ) mod p,
UQI = ¾,  UQI = 3⁄4,
Vll = («111 UQI + «112^02 + ^ll) mod p, Vll = («111 UQI + «112^02 + ^ll) mod p,
Vl2 = («121 «01 + «122^02 + bU) mod p, Vl2 = («121 «01 + «122^02 + b U ) mod p,
Mii = (l I n) mod^, uxl= {vnl vxl) mod^, Mii = (l I n) mod^, u xl = {v n lv xl ) mod^,
V21 = («211 «11 + «212^12 + ¾l) mod p m。d p
Figure imgf000029_0002
22 = («22i «ii + a222uu + b22) mod p 代入具体的值, 推导出
Figure imgf000030_0001
V 2 1 = («211 «11 + «212^12 + 3⁄4l) mod pm. Dp
Figure imgf000029_0002
22 = («22i «ii + a 222 u u + b 22 ) mod p Substituting specific values, deriving
Figure imgf000030_0001
J^l =Ει( ι, 2, X3) = ν2ι
Figure imgf000030_0002
J^l =Ει( ι, 2 , X3) = ν 2 ι
Figure imgf000030_0002
γ2 = Ε2(χι,χ2, X3) = v22
Figure imgf000030_0003
γ 2 = Ε 2 (χι,χ 2 , X3) = v 2 2
Figure imgf000030_0003
由于" = r =2, 规定 E'(x) = Ε(:)。  Since " = r = 2, E'(x) = Ε(:) is specified.
然后, 推导出对应的解密函数 DO : Then, derive the corresponding decryption function DO:
«11 = (¾ii + C2U (y2 b22) ) mod;?, tin = (<¾2i
Figure imgf000030_0004
+ ciri (y2 b22) ) mod;?, 11 = (1 / ¾ii) mod p,
«11 = (3⁄4ii + C2U (y 2 b 2 2) ) mod;?, tin = (<3⁄42i
Figure imgf000030_0004
+ c iri (y 2 b 2 2) ) mod;?, 11 = (1 / 3⁄4ii) mod p,
12 = ( n I un) mod;?,  12 = ( n I un) mod;?,
(cm ( n - bn) + Cn2( i2 b12) ) mod;?,
Figure imgf000030_0005
(cm ( n - bn) + Cn 2 ( i2 b 12 ) ) mod;?,
Figure imgf000030_0005
1  1
α\Ύ1 (_ ^ll + -) Ύ\Ύ1 ( _ ^ll + -)
«222(^1 -^21) «222(^1 -^21)
211 222― 212 221 211 222 — 212 221 a\\\a\22― aina 211 222― 212 221 211 222 — 212 221 a\\\ a \22― a in a
Figure imgf000030_0006
UQ2 = (Ci2i ( n - bn) + C122 (vi2 - bi2) ) mod
Figure imgf000030_0006
UQ2 = (Ci2i ( n - bn) + C 122 (v i2 - bi 2 ) ) mod
Figure imgf000031_0001
Figure imgf000031_0001
«222(^1-^21) «212(^2-^22) «222(^1-^21) «212(^2-^22)
Q Q ― Q o o o ― o o  Q Q ― Q o o o ― o o
211 222 212 221 211 222 212 221  211 222 212 221 211 222 212 221
(- · +  (- · +
ηι (— b12 + 1/ ((- "2210 ) + a2 (y2 -b22) ) ηι (- b 12 + 1/ ((- "2 21 0 ) + a 2 (y 2 -b 22 ) )
/ Q o ― o o o o ― o o  / Q o ― o o o o ― o o
I "211 222 212 221 211 222 212 221  I "211 222 212 221 211 222 212 221
( "222 O ) a2l2 y2_b22) 》》 -an2aui))mod p( "222 O ) a 2l2 y 2 _b 22 ) 》》 - an2aui )) mod p ;
211 222 212 221 211 222 212 221 / 211 222 212 221 211 222 212 221 /
若 DO采用展开后表示形式, 将上式代入具体的值, 推导出 If the DO adopts the expanded representation, the above formula is substituted into a specific value, and is derived.
Z = (z!, ...,zn) = O(y) = (DjCyj, y2\ D2(y!, y2)) , 其中: Z = (z!, ..., z n ) = O(y) = (DjCyj, y 2 \ D 2 (y!, y 2 )) , where:
15 + lOv, +2v7 t ^ 15 + lOv, +2v 7 t ^
Z^=Ό^(V^ V ) = Urn = : ―——― ^ mod 17, Z^=Ό^(V^ V ) = Urn = : ―——― ^ mod 17,
1 llyi'½j 01 14 + 15^1 +^2 +12^+11^2 +11^2 2 1 llyi ' 1⁄2j 01 14 + 15^ 1 + ^ 2 + 12^ + 11^ 2 + 11^ 2 2
、 10 + 2^ +8^2 +y2 +3yiy2 +3y2 2 显然, 上述的展开后的 E 、 DO 与展开之前的它们相比, 其层次和嵌套 方式等结构信息丢失了,这一性质为密码分析带来了巨大的困难;但通常 D0 的次数很高, 只有在函数很简单时才能把它完全展开。 , 10 + 2^ +8^ 2 +y 2 +3 yi y 2 +3y 2 2 Obviously, the above-mentioned expanded E and DO are lost compared to the structure before the expansion, such as hierarchy and nesting. This property poses great difficulties for cryptanalysis; however, D0 is usually very high, and it can only be fully expanded if the function is simple.
计算单向函数链的逆 ΙΓ1^, 需要使用私钥的秘密参数的 e3: To calculate the inverse of a one-way function chain 1 ^, you need to use the secret parameter of the private key e 3:
x\ = {z\ - 3 ¾( )) mod p, x\ = {z\ - 3 3⁄4 ( )) mod p,
w2 = z2 - H2( i) = ( - H2(zi - e3 ¾( ))) mod p, wi = ^i - Hi(w2) = ((zi - e3 ¾( )) - Hi(z2 - H2(zi - e3 ¾( )))) mod;?, 虽然真实的单向函数是不可展开的, 但按照本实施例的特殊规定: w 2 = z 2 - H 2 ( i) = ( - H 2 (zi - e 3 3⁄4 ( ))) mod p, wi = ^i - Hi(w 2 ) = ((zi - e 3 3⁄4 ( )) - Hi(z 2 - H 2 (zi - e 3 3⁄4 ( )))) mod;?, although the true one-way function is not expandable, according to the special provisions of this embodiment:
w2 = (z2 - (ζι - 2 3)3) mod p, wi = (zi - 2 z2 3 - (z2 - (ζι - 2 3)3)3) mod ρ·, w 2 = (z 2 - (ζι - 2 3 ) 3 ) mod p, Wi = (zi - 2 z 2 3 - (z 2 - (ζι - 2 3 ) 3 ) 3 ) mod ρ·,
例如: 设明文 w = (7,8), x = U(w) = (9, 6, 12), 密文 j = E(x) = (3, 12); z = O(y) = (16, 6), 恢复的明文 w = H_ ) = (7, 8), 这说明上述加解密算法是正确 的。 同理可证明签名算法的正确性。  For example: Let plaintext w = (7,8), x = U(w) = (9, 6, 12), ciphertext j = E(x) = (3, 12); z = O(y) = ( 16, 6), the recovered plaintext w = H_ ) = (7, 8), which means that the above encryption and decryption algorithm is correct. The same reason can prove the correctness of the signature algorithm.
PKI (Public Key Infrastructure)是基于公钥密码而建立起来的网络信任技 术体制。 近年来, PKI建设面临重大挑战, 突出表现在管理成本急剧增加。 其 主要原因之一是目前的公钥密码体制难以适应超大规模网络的复杂使用环境。 本发明提出了一个公钥密码应对网络信任体系建设的挑战的基本对策:即采用 基于身份的公钥密码编码体制。  PKI (Public Key Infrastructure) is a network trust technology system based on public key cryptography. In recent years, PKI construction has faced major challenges, highlighted by the sharp increase in management costs. One of the main reasons is that the current public key cryptosystem is difficult to adapt to the complex use environment of ultra-large-scale networks. The present invention proposes a basic countermeasure for a public key cryptography to cope with the challenge of building a network trust system: an identity-based public key cryptography system.
所谓 "基于身份", 就是让公钥的内容就是用户的身份标志 ID——诸如姓 名、 电话、 Email等信息的某种组合, 用这些信息本身, 就能直接确定出这个 公钥是属于谁的; 而不再需要像 PKI那样用一个公钥证书把用户的 ID与这个 用户的公钥绑定在一起。这种技术点的实质是 "全网所有用户共用一个公钥"。 "基于身份"的实现为网络环境下的公钥管理带来的好处:一是经济效益显著; 二是用户容量巨大; 三是实现了公钥数据与用户标识的一体化管理。  The so-called "identity-based" means that the content of the public key is the user's identity mark ID - some combination of information such as name, phone, email, etc., with the information itself, you can directly determine who the public key belongs to. Instead of using a public key certificate like PKI, bind the user's ID to the user's public key. The essence of this technology point is that "all users share a public key". The realization of "identity-based" brings the benefits of public key management in the network environment: first, the economic benefits are significant; second, the user capacity is huge; third, the integrated management of public key data and user identification is realized.
参照图 7, 示出了一种用于编码和译码数字消息的方法实施例, 图 7示出 了歩骤流程图。 该实施例采用了基于身份的技术点, 具体可以包括:  Referring to Figure 7, an embodiment of a method for encoding and decoding digital messages is shown, and Figure 7 shows a flow chart of the steps. This embodiment adopts an identity-based technology point, and specifically includes:
歩骤 701、 选择正整数 w, n, n r, 其中, m >n≥n, ;  Step 701: Select a positive integer w, n, n r, where m > n ≥ n, ;
歩骤 702、 生成一包含有 E'(x,ID)的公钥, 其中, E'(x,ID)为在域 F上的 从 ...,xm,ID
Figure imgf000032_0001
...,jv)的非线性映射函数组,所述 ID = (ID1;
Step 702: Generate a public key including E′(x, ID), where E′(x, ID) is from the domain F, ..., x m , ID
Figure imgf000032_0001
a non-linear mapping function group of ..., jv), said ID = (ID 1;
ID)为授权用户的身份标识; 并且, 所述 E'(x,ID)中隐含有接口函数 R(x), 其 用于根据 ( l, 得到"个关于 (Xi, ..., )的函数: 0(x) = ( oi(xU ..., Xm), …-,ID) is the identity of the authorized user; and, in the E'(x, ID), the interface function R(x) is implicitly included, which is used to obtain "one (Xi, ..., ) according to (1) The function: 0 (x) = ( oi(x U ..., X m ), ...-,
U0n(X\, ···, )) = R(X); U0n(X\, ···, )) = R(X);
歩骤 703、 针对身份标识为 Π 的授权用户, 生成一与该身份标识相对 应的私钥, 所述私钥包括 R ;  Step 703: Generate, according to an authorized user whose identity is Π, a private key corresponding to the identity, where the private key includes R;
歩骤 704、 设置单向函数链 HO), 以及单向函数链的逆函数 H—1^; Step 704, setting a one-way function chain HO), and an inverse function of the one-way function chain H- 1 ^;
歩骤 705、 采用所述公钥、 单向函数链 HO)和 ID(^), 对消息 进行编 码, 得到编码消息 N; 采用所述私钥和单向函数链的逆函数 H— )对该编码消 息 N进行译码, 得到译码消息 ;  Step 705: Using the public key, the one-way function chain HO) and the ID (^), encoding the message to obtain the encoded message N; using the private key and the inverse function H-) of the one-way function chain Encoding the message N to decode, to obtain a decoded message;
和 /或, 歩骤 706、 采用所述私钥和单向函数链的逆函数 H— 对消息 M 进行编码, 得到编码消息 采用所述公钥、 单向函数链 HO)和 ID(^), 对 该编码消息 N'进行译码, 得到译码消息 7 。 And/or, step 706, using the private key and the inverse function H of the one-way function chain to encode the message M, obtaining the encoded message using the public key, the one-way function chain HO), and the ID (^), Correct The encoded message N' is decoded to obtain a decoded message 7.
本实施例可以通过以下歩骤得到公钥和私钥:  In this embodiment, the public key and the private key can be obtained by the following steps:
设置由 X到 的可逆非线性映射函数组:(y1...,yn) =E( , ID) = (Έ^,...,xm, ID1... ,IDr), ... , E„(xh...,xm, IDh ... ,IDr)); Set the set of reversible nonlinear mapping functions from X to: (y 1 ..., y n ) = E( , ID) = (Έ^,...,x m , ID 1 ... , ID r ), ... , E„(x h ..., x m , ID h ... , ID r )) ;
依据 E(x,ID)的逆函数, 生成私钥;  Generating a private key according to the inverse function of E(x, ID);
选取 E(x, ID)中的《'个函数作为 E'(x, ID), 得到公钥  Select "' function as E'(x, ID) in E(x, ID) to get the public key
当用于加解密过程时, m>n = r ; 而在 >«≥«'的情况下, 可以用于各 种数字签名的情况。  When used for the encryption and decryption process, m>n = r; and in the case of >«≥«', it can be used for various digital signatures.
优选的, 本实施例也可以其他优选歩骤得到公钥和私钥, 在后面的具体实 施例中会详细介绍。  Preferably, the present embodiment may also obtain the public key and the private key in other preferred steps, which will be described in detail in the following specific embodiments.
从数学角度描述本实施例的一个优选例子 (以有理分式为例) 如下: 设 ID为经过规定的变换以后的用户身份标识, ID = (ID1 ...,ID , r为正 整数, ID^F;把公钥 Ε' Ο中的系数规定为 ID的映射函数,该公钥经过展开、 化简、 整理后可表示为 F上的 +r元非线性变换: A preferred example of the present embodiment is described from a mathematical point of view (taking the rational fraction as an example) as follows: Let the ID be the user identity after the specified transformation, ID = (ID 1 ..., ID, r is a positive integer, ID^F; The coefficient in the public key Ε' 规定 is defined as the mapping function of the ID. After the public key is expanded, simplified, and collated, it can be expressed as a +r element nonlinear transformation on F:
(yi, ...,JV) = E,(x, ID)  (yi, ..., JV) = E, (x, ID)
(Ei( i, ...,xm, IDi, IDr), Ew i, ...,xm, IDb IDr)), (Ei( i, ..., x m , IDi, ID r ), E w i, ..., x m , ID b ID r )),
Figure imgf000033_0001
Figure imgf000033_0001
x e }Q, - ,pi-pre n, - ,px , F, l i m, l j n, l^k^r, πβ^Ο, π^^Ο, τ〉0, 并且在 7T1Q, ΤΓ20,..., ^Ο中至少有一个 Ό≥1; 把该 E'(x, ID)作为公钥密码系 统中全体用户共享的基于身份的公钥。 x e } Q, - , pi-p r , e n, - , px , F, lim, ljn, l^k^r, πβ^Ο, π^^Ο, τ>0, and at 7T 1Q , ΤΓ 20 ,..., ^Ο at least one Ό ≥1; use the E'(x, ID) as the identity-based public key shared by all users in the public key cryptosystem.
本实施例中结合 " ID映射"的目的在于: 实现基于身份的公钥密码体制。 下面详细描述具体实现过程的例子:  The purpose of combining "ID mapping" in this embodiment is to implement an identity-based public key cryptosystem. An example of a specific implementation process is described in detail below:
第一步、 把密码参数 T、 G规定为 ID的函数  The first step is to define the password parameters T and G as functions of ID.
这是与前述实施例有所不同的一个地方: 所述 T和 /或 G中的至少一个系 数为 ID的映射函数。 gp, 在 T中任一个或者多个 的至少一个系数为 ID的 映射函数; 和 /或, 在 G中任一个或者多个 的至少一个系数为 ID的映射函 数。 优选的, 最后一层 中的至少一个系数为 ID的映射函数; 和 /或, 最后 一层 中的至少一个系数为 ID的映射函数。 This is a different place from the previous embodiment: at least one of the coefficients of T and / or G is a mapping function of the ID. Gp, at least one coefficient of any one or more of T is ID a mapping function; and/or a mapping function in which at least one coefficient of any one or more of G is an ID. Preferably, at least one coefficient in the last layer is a mapping function of the ID; and/or at least one coefficient in the last layer is a mapping function of the ID.
例如, 设授权用户的身份标识 ID = (ID1 ...,i ), r为正整数, ID^F; 由私钥分配中心把 T、 G中的函数的系数, 规定为 ID的映射函数, 从而使 T、 G成为 ID的函数; For example, let the authorized user's identity ID = (ID 1 ..., i ), r be a positive integer, ID ^ F; the coefficient of the function in T, G is specified by the private key distribution center as the mapping function of the ID , so that T, G become a function of ID;
这样做的好处是: 限制了公钥 E'(x, ID)的函数规模。 例如, E'(x,ID)仅仅 是关于ID^^ID 的一次函数。 反之, 如果把!^中的系数规定为 ID的函数, 经过非线性变换后 ID的次数增加, 使得公钥的函数规模太大, 降低实用性。  The benefits of doing this are: Limiting the size of the function of the public key E'(x, ID). For example, E'(x, ID) is just a function of ID^^ID. On the contrary, if you put it! The coefficient in ^ is defined as a function of ID. After the nonlinear transformation, the number of IDs increases, making the function size of the public key too large, reducing the practicability.
第二步、 把1\ G合成为 E(x,ID), 建立公钥 E'(x, ID)  The second step is to synthesize 1\ G into E(x, ID) and establish the public key E'(x, ID)
把《Q(x)、 T、 G合成为 F上的非线性变换: Combine " Q (x), T, G into a nonlinear transformation on F:
y = (yi, ...,_¾) = E(X, ID)  y = (yi, ...,_3⁄4) = E(X, ID)
= (Ei( i, ...,xm, IDi, IDr), Ew( i, ...,xm, IDb IDr)), 展开、 化简以后, = (Ei( i, ..., x m , IDi, ID r ), E w ( i, ..., x m , ID b ID r )), after expansion, simplification,
yf =E
Figure imgf000034_0001
y f =E
Figure imgf000034_0001
X" y ej0,kl...km,pl...prejXkl...km,pl...pr , iUk^ t, l i m, l j n, l^k^r, πβ^Ο, π^^Ο, τ〉0; 令 E'( , ID) = ( Ει( ι, ... , IDi, ... , IDr), ... , Ew b ...,xm, IDb ... , IDr)), X " y e j0,k l ...k m ,p l ...p r , e jXk l ...k m ,p l ...p r , iU k ^ t, lim, ljn, l^ k^r, πβ^Ο, π^^Ο, τ>0; Let E'( , ID) = ( Ει( ι, ... , IDi, ... , ID r ), ... , E wb ..., x m , ID b ... , ID r )),
E'( , ID) £ E( , ID); E'( , ID) £ E( , ID);
把 E'(x, ID)作为全体用户共享的公钥, 公开发布;  E'(x, ID) is publicly released as a public key shared by all users;
第三步、 把!^1、 G—1合成为 D0 , 建立每个用户的私钥 {DO ,R } 私钥分配中心把授权用户的 ID代入密码参数 T G1, 把 T G— 1合成 为 D0 , 然后把 {DO ,R(x)}作为私钥, 发给授权用户秘密保存; The third step, put! ^ 1, G- 1 synthesized as D0, the establishment of each user's private key {DO, R} private key distribution center to an authorized user ID code parameter substituting TG 1, the synthesis TG- 1 to D0, then {DO, R(x)} is sent as a private key to the authorized user for secret storage;
在上述合成中, ID 的微小差别, 在经过一系列公式推导后, 所得到的公 钥和私钥将出现巨大的差别。 第四步、 进行加密与解密、 数字签名与验证 In the above synthesis, the small difference in ID, after a series of formula derivation, will result in a huge difference between the public and private keys. The fourth step, encryption and decryption, digital signature and verification
把授权用户 f的身份标识 ID(^), 代入 E'(x,ID), 推导出 E 再进行 加密或验证数字签名的数据处理, BP: γ = Ε'κ{χ) =
Figure imgf000035_0001
ΙΌ(Κ))0
Substituting the identity ID (^) of the authorized user f into E'(x, ID), deriving E and encrypting or verifying the data processing of the digital signature, BP: γ = Ε 'κ{χ) =
Figure imgf000035_0001
ΙΌ(Κ)) 0
为更清楚地表述本实施例的具体实施方式, 下面描述一个小数据的例子: 设 r=l, 即 ID = (ID), e3 = 2, = (b„, b12)= (1, 2), B2= (b2U b22)= (5 + \5 ID + ID2, 6 + 16ID + ID2),
Figure imgf000035_0002
To more clearly illustrate the specific embodiment of the present embodiment, an example of a small data is described below: Let r = l, ie ID = (ID), e 3 = 2, = (b„, b 12 )= (1, 2), B 2 = (b 2U b 22 )= (5 + \5 ID + ID 2 , 6 + 16ID + ID 2 ),
Figure imgf000035_0002
a 211 212 1 + llID + ID' 2 + 12ID + ID
Figure imgf000035_0003
a 211 212 1 + llID + ID' 2 + 12ID + ID
Figure imgf000035_0003
a 221 a 222 3 + 13ID + ID 4 + 14ID + ID  a 221 a 222 3 + 13ID + ID 4 + 14ID + ID
15 + 10ID + 8ID2 1 + 6ID + 9ID^ 15 + 10ID + 8ID 2 1 + 6ID + 9ID^
1 + 2ID + ID2 1 + 2ID + ID2 1 + 2ID + ID 2 1 + 2ID + ID 2
A,  A,
10 + 15ID + 9ID 8 + 3ID + 8ID  10 + 15ID + 9ID 8 + 3ID + 8ID
1 + 2ID + ID2 1 + 2ID + ID2 运用上述推导出 的类似方法, 计算出全体用户共享的公钥为: 1 + 2ID + ID 2 1 + 2ID + ID 2 Using the similar method derived above, calculate the public key shared by all users as:
E'( , ID) = E( , ID) = (Ei( i, x2, x3, ID), E2(x1 x2, x3, ID)), 其中:
Figure imgf000035_0004
E'( , ID) = E( , ID) = (Ei( i, x 2 , x 3 , ID), E 2 (x 1 x 2 , x 3 , ID)), where:
Figure imgf000035_0004
= ((16 + 10ID + 13ID2+ 5 j + lOID j + 9ID2 j + 2ID j2+ 7IDV+ 6 2 + 14IDx2+llID + 8 1 2 + 15ID i 2 + 16ID2 i 2+ 16x2 2+ 5IDx2 2+ 4ID 2 + 10 3 + 3ID 3 + ID + 8ID i 3 + HID2 i 3 + \6x2x3 + 13IDx2x3 + 15ID x3 + 8ID 3 2 + 11ID¾2) / (12 + \3χ + χχ + \Αχ2 + 9χχχ2 + 14χ2 2+ 9χ3+ 4χχ3 + χ2Χ3 + 4χ3 2)) mod 17, = ((16 + 10ID + 13ID 2 + 5 j + lOID j + 9ID 2 j + 2ID j 2 + 7IDV+ 6 2 + 14IDx 2 +llID + 8 1 2 + 15ID i 2 + 16ID 2 i 2 + 16x 2 2 + 5IDx 2 2 + 4ID 2 + 10 3 + 3ID 3 + ID + 8ID i 3 + HID 2 i 3 + \6x 2 x 3 + 13IDx 2 x 3 + 15ID x 3 + 8ID 3 2 + 11ID3⁄4 2 ) / (12 + \ 3χ + χχ + \ Αχ 2 + 9χ χ χ 2 + 14χ 2 2 + 9χ 3 + 4χχ 3 + χ 2 Χ3 + 4χ 3 2)) mod 17,
^2 = Ε2( ι, 2, Χ3, ID) ^2 = Ε 2 ( ι, 2, Χ 3, ID)
= ((13 + 7ID + 13ID2+ lO j + 15ID i + 9ID2 j + 13 j2+ 15ID i2 + 7ID2xi2 + 14 2+ 5ID 2 + 11 ID¾ + 1 χχ2 + 4ID i 2 + 161Ό2χχ2 + 10x2 2 + 16JDx2 2 + 4ID 2 + 3x3+ 13ID 3+ ID + 1 3+ 9ID i 3 + HID2 i 3+ \\χ2χ3+ 8IDx2x3 + 15ID x3+ x3 2+ 9ID 3 2 + 11ID¾2) / (12 + \ χχ+χχ + 14 2+ 9χχ2 + Πχ2 2+ 9χ3 + 4 ι 3 + Χ2Χ3 + 4 3 )) mod 17; = ((13 + 7ID + 13ID 2 + lO j + 15ID i + 9ID 2 j + 13 j 2 + 15ID i 2 + 7ID 2 xi 2 + 14 2 + 5ID 2 + 11 ID3⁄4 + 1 χχ 2 + 4ID i 2 + 161Ό 2 χχ 2 + 10x 2 2 + 16JDx 2 2 + 4ID 2 + 3x 3 + 13ID 3 + ID + 1 3+ 9ID i 3 + HID 2 i 3 + \\χ 2 χ 3 + 8IDx 2 x 3 + 15ID x 3 + x 3 2 + 9ID 3 2 + 11ID3⁄4 2 ) / (12 + \ χ χ +χχ + 14 2 + 9χχ 2 + Πχ 2 2 + 9χ 3 + 4 ι 3 + Χ2Χ3 + 4 3 )) mod 17;
私钥分配中心为各个授权用户建立私钥, 例如, 对于 ID=6的用户, 把 ID 的值代入有关的密码参数: B2 = (b2i, b22) = (5 + 15 ID + ID2, 6 + 16 ID + ID2) = (12, 2), The private key distribution center establishes a private key for each authorized user. For example, for a user with ID=6, the value of the ID is substituted into the relevant password parameter: B 2 = (b 2 i, b 22 ) = (5 + 15 ID + ID 2 , 6 + 16 ID + ID 2 ) = (12, 2),
Figure imgf000036_0001
Figure imgf000036_0001
然后推导出该用户的私钥 DO为 Then derive the user's private key DO is
Figure imgf000036_0002
Figure imgf000036_0002
例如: 设明文 iv = (7, 8), x = HO) = (9, 6, 12), 密文 j = E(x, ID) = (4, 9); z = DO = (16,6), 恢复的明文 iv = IT1 = (7, 8), 说明上述加解密算法是正确 的。 同理可证明签名算法的正确性。 For example: Let plaintext iv = (7, 8), x = HO) = (9, 6, 12), ciphertext j = E(x, ID) = (4, 9); z = DO = (16,6 ), the recovered plaintext iv = IT 1 = (7, 8), indicating that the above encryption and decryption algorithm is correct. The same reason can prove the correctness of the signature algorithm.
相应的, 针对上述实施例, 本发明还提供了一装置实施例, 至少包括以下 单元:  Correspondingly, with respect to the above embodiments, the present invention also provides an apparatus embodiment, which includes at least the following units:
公钥生成单元,用于生成一包含有 E'(x, ID)的公钥,所述 E'(x, ID)为在域 F上的从 IDb ..., IDr)ilJ(y!, j )的非线性映射函数组, 所述 ID = (ID1; ...,ID 为授权用户的身份标识; 并且, 所述 E'(x, ID)中隐含有接口函数 R(x),其用于根据 ( i, 得到"个关于 (χι, ..., )的函数:《( :) : ^^·^, xm), u0n(x\, ...,xm)) = R(x); 其中, m, n, r , r为正整数, m > n≥ n, ; 私钥生成单元, 用于针对身份标识为 π 的授权用户, 生成一与该身份 标识相对应的私钥, 所述私钥包括 R ; a public key generating unit, configured to generate a public key including E'(x, ID), which is a slave ID b ..., ID r ) ilJ (y) on the domain F !, j) of the non-linear mapping function group, the ID = (ID 1; ..., ID is the identity of the authorized user; and, the E' (x, ID) implicitly contains the interface function R ( x), which is used to get a function about (χι, ..., ) according to (i, "( :) : ^^·^, x m ), u 0n (x\, ..., x m )) = R(x); where m, n, r , r are positive integers, m > n≥ n, ; a private key generation unit for generating an identity with an authorized user whose identity is π Identify a corresponding private key, the private key including R;
单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— 以及至少包括加解密单元和签名验证单元中的一个, 其中,  a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H− of the one-way function chain, and at least one of an encryption/decryption unit and a signature verification unit, wherein
加解密单元, 用于采用所述公钥、 单向函数链 HO)和 ID(^), 对消息 进行编码, 得到编码消息 N; 采用所述私钥和单向函数链的逆函数 H— )对该 编码消息 N进行译码, 得到译码消息 ;  An encryption and decryption unit, configured to encode the message by using the public key, the one-way function chain HO) and the ID (^), to obtain an encoded message N; using the private function and the inverse function of the one-way function chain H—) Decoding the encoded message N to obtain a decoded message;
或者, 签名验证单元, 用于采用所述私钥和单向函数链的逆函数 H- )对 消息 进行编码,得到编码消息 N,;采用所述公钥、单向函数链 HO)和 Π , 对该编码消息 N'进行译码, 得到译码消息 7 。 下面介绍一些上述实施例具体实现过程中的诀窍性信息。 Alternatively, the signature verification unit is configured to encode the message by using the private key and the inverse function H-) of the one-way function chain to obtain the encoded message N, and use the public key, the one-way function chain HO) and Π, The encoded message N' is decoded to obtain a decoded message 7. The following describes some of the ambiguous information in the specific implementation process of the above embodiments.
如何使得公钥中 ID的次数比较低、 私钥中的等价的 ID的次数非常高: How to make the number of IDs in the public key low, and the number of equivalent IDs in the private key is very high:
(1)在加密的最后一层密码参数 (例如 Gs中的系数) 中注入 ID的映射, 对于推导解密函数的推导过程来说, 相当于在第一层就注入了 ID的映射, 经 过后面的多层非线性变换, 使解密函数中的 ID的次数得到放大。 (1) Injecting the mapping of the ID in the last layer of the encrypted password parameter (for example, the coefficient in G s ), for the derivation process of deriving the decryption function, it is equivalent to injecting the mapping of the ID in the first layer, after the latter The multi-layer nonlinear transformation magnifies the number of IDs in the decryption function.
(2) 使用比较大的《, 在解密时依次计算 的过程中, 由于 ^^要 参与 vy的运算, 使得解密函数的 ID的次数被串行放大。 (2) Using a relatively large one, in the process of sequentially calculating during decryption, since ^^ is to participate in the operation of v y , the number of IDs of the decryption function is serially amplified.
(3) 采用其非线性次数保持不变的非线性变换,例如把 设置为:  (3) Use a nonlinear transformation whose nonlinear number remains constant, for example, set to:
t jkQ + t jklV jl +… + t jknV jn , t jkQ + t jkl V jl +... + t jkn V jn ,
ujk = Gjk(vjU ... ,vjn = +t v + +t v mu jk = G jk (v jU ... , v jn = +tv + +tv m ,
'jOO 卞 { jOl 1 卞…卞 lj n vjn tjkh tj0l≡Yp, jk, Vjk≡¥p(Xx, ..., Xm), k= 1, 然后由 推导出 G ' 。o
Figure imgf000037_0001
Gΐβ )为:
'jOO 卞{ jOl 1 卞...卞l jn v jn tjkh tj0l≡Y p , jk, V jk ≡¥ p (Xx, ..., X m ), k= 1, and then G ' is derived. o
Figure imgf000037_0001
Gΐβ ) is:
_ 一 ^12^720 + t j\。t j 22一 tj22tj00Uj + ^j20^j02Uj\ + ^j\2^j00Uj2一 ^j\0^j02Uj2 _ one ^12^ 7 20 + tj\. Tj 22一tj22tj00 U j + ^j20^j02 U j\ + ^j\2^j00 U j2一^j\0^j02 U j2
mod p ^j\2^j2\—tjVitj22 + ^j22^jO\Uj\ ~ ^j2\^j02Uj\ ~ ^j\2^jO\Uj2 + ^j\^j02Uj2 Mod p ^j\2^j2\—tjVitj22 + ^j22^jO\ U j\ ~ ^j2\^j02 U j\ ~ ^j\2^jO\ U j2 + ^j\^j02 U j2
v _ lj\Vj20 Lj j2\ τ Lj2VjQQuj\ lj20lj0\uj\ lj\\lj00uj2 τ lj\0lj0\uj2 mQ(^ p —tj tj 22 + ^j22^jQ\Uj\ -^/■ 21^/02^/1 ~^j\2^jQ\Uj2 + Ί 1^/02^/2 v _ l j\Vj20 L j j2\ τ L j2VjQQ u j\ l j20 l j0\ u j\ l j\\ l j00 u j2 τ l j\0 l j0\ u j2 mQ( ^ p —tj tj 22 + ^j22^jQ\ U j\ -^/■ 21^/02^/1 ~^j\2^jQ\ U j2 + Ί 1^/02^/2
显然, 若把上述加密过程中的系数^规定为 ID的映射函数, 则解密过程 ID的次数是加密过程中 ID的次数的 n倍, 而;的次数却保持不变。  Obviously, if the coefficient ^ in the above encryption process is specified as the mapping function of the ID, the number of decryption process IDs is n times the number of IDs in the encryption process, and the number of times remains unchanged.
进一歩, 本实施例中具体的编译码歩骤就可以优化为:  Further, the specific coding code step in this embodiment can be optimized as:
针对加解密的情形, 可以为: 通过单向函数链 HO)将原始消息转换为中 间结果消息 M,采用所述公钥和 ID(^),对消息 进行编码,得到编码消息 N; 以及, 采用所述私钥对该编码消息 N进行译码, 得到译码消息 , 通过单向函 数链的逆函数 H—^)将中间结果消息 转换为最终译码结果;  For the case of encryption and decryption, the original message may be converted into an intermediate result message M by using a one-way function chain (HO), and the message is encoded by using the public key and ID (^) to obtain an encoded message N; The private key decodes the encoded message N to obtain a decoded message, and converts the intermediate result message into a final decoding result by using an inverse function H-^ of the one-way function chain;
针对签名的情形, 可以为: 采用所述私钥对消息 进行编码, 得到中间 结果 z,通过单向函数链的逆函数 H— 将中间结果 z转换为数字签名消息 N、 以及, 通过单向函数链 HO)将数字签名消息 N'转换为中间结果 X, 采用所述 公钥和 ID(^), 对该中间结果 X进行译码, 得到译码消息 7 。  For the case of signature, it may be: using the private key to encode the message, obtaining an intermediate result z, transforming the intermediate result z into a digital signature message N through the inverse function H of the one-way function chain, and, through a one-way function The chain HO) converts the digital signature message N' into an intermediate result X, and uses the public key and ID (^) to decode the intermediate result X to obtain a decoded message 7.
由于关于单向函数链的技术点, 在前面已经详细描述, 故在此不再赘述。 子歩骤 a、 由 T1和 G— 1计算得到 D0 , 并且, 所述 DO与 ID相关; 子歩骤 b、将所述 D0分为至少两个部分,保存在至少两个私钥分配中心, 每个部分都与 ID相关; Since the technical point about the one-way function chain has been described in detail above, it will not be described here. Ho sub-step a, obtained from the calculation of T 1 and G-1 D0, and, associated with said DO ID; ho sub-step B, the D0 is divided into at least two parts, at least two private key stored in the distribution center , each part is related to the ID;
子歩骤 c、 各私钥分配中心把授权用户标识 Π 代入各自秘密保存的那 部分 DO , 计算出私钥的一部分, 发送给该用户;  Sub-step c, each private key distribution center substitutes the authorized user identifier Π into the part DO that is secretly saved, calculates a part of the private key, and sends it to the user;
子歩骤 d、 该用户将各部分的私钥合成, 计算得到私钥。  Sub-step d, the user synthesizes the private key of each part, and calculates the private key.
如图 8所示, 是本发明多个私钥分配中心联合建立私钥的示意图。从数学 角度对上述过程的一个例子描述如下:  As shown in FIG. 8, it is a schematic diagram of a plurality of private key distribution centers of the present invention jointly establishing a private key. An example of the above process is described mathematically as follows:
(1) 由网络中唯一的一个一级私钥分配中心 ^(^ 建立公钥 E'(x, ID), 并建立对应于 E'(x, ID)的私钥生成函数:  (1) A unique primary key distribution center in the network ^(^ establishes the public key E'(x, ID) and establishes a private key generation function corresponding to E'(x, ID):
Z = (ζχ, ...,zn) = O(y, dx, d2, ...) Z = (ζχ, ..., z n ) = O(y, dx, d 2 , ...)
= (Di(yb ...,y dx, d2, ...), Dw(yb ...,y dx, d2, ...)), 该函数中的变元 4,4, ...是 ID的映射函数: άχ= χ{ΙΌ), d2=f2(W), ... ;= (Di(y b ..., yd x , d 2 , ...), D w (y b ..., yd x , d 2 , ...)), argument 4 in the function, 4, ... is the mapping function of ID: ά χ = χ {ΙΌ), d 2 = f 2 (W), ... ;
(^、^(^按照约定的方法,把 DO,^^ 分离成 ?个部分: {Dd A, d2, ...), O(h)(y, dx, h, ...)}, 分别发给 2个二级私钥分配中心, 即对于 (^, ^(^ According to the agreed method, separate DO, ^^ into parts: {Dd A, d 2 , ...), O (h) (y, d x , h, ...) }, sent to 2 secondary private key distribution centers, ie
把 D^j, ^^…)发给 KDC 秘密保存; 并把 _ i(ID), /2(ID),…, 发给 所有的二级私钥分配中心秘密保存; 其中, 所述的 "把 Ο ,Α,Α, 分离成 2 个部分" 的具体实现方法, 属于公知技术。 Send D^j, ^^...) to the KDC for secret preservation; and send _i(ID), / 2 (ID),..., to all secondary private key distribution centers to secretly save; The specific implementation method of separating Ο, Α, Α, into two parts is a well-known technique.
(3) ,在为某个授权用户 f建立私钥时, KDC21, ...,10) 2/!分别先把该授权 用户 K的身份标识 ID(^)的值, 代入到 ID的映射函数 / ID), /2(ID),..., 计算 出 4, 4, ...的值; 再把 H .的值代入到 KDC21, KDC2A各自秘密保存的 Ό , dh d2, ...), 计算出
Figure imgf000038_0001
(3), when establishing a private key for an authorized user f, KDC 21 , ..., 10) 2/! first substitute the value of the identity ID (^) of the authorized user K into the mapping of the ID. Function / ID), / 2 (ID),..., calculate the value of 4, 4, ...; then substitute the value of H. into KDC 21 , KDC 2A secretly saved Ό, d h d 2 , ...), Calculate
Figure imgf000038_0001
.
(4) , 授权用户 f从 KDC21, ...,KDC2/^别领取 D )O , ...,D )O , 按照 约定的方法, 还原为该用户的完整的私钥 :)。 (4), authorized user f from KDC 21 , ..., KDC 2 / ^ do not receive D) O, ..., D) O, according to the agreed method, restore to the user's complete private key :).
采用多个私钥分配中心合成私钥的技术点,是为了保证即使是私钥分配中 心的内部人员, 也无法窃取用户的私钥。 为更清楚地表述具体实施方式, 下面 描述一个小数据的例子:  The technical point of using multiple private key distribution centers to synthesize private keys is to ensure that even the internal personnel of the private key distribution center cannot steal the user's private key. To illustrate the specific implementation more clearly, an example of a small data is described below:
在前述的实施例中, 设^ 1 ^中的元素是数, β2中的元素是 ID的映 射, G中没有参数, 则私钥生成函数为 In the foregoing embodiment, it is assumed ^ 1 ^ is the number of elements, the elements are mapped β 2 ID, G, there is no parameter, the secret key generation function
z = (z z2) = O(y, A2, B2) = (O,(y, A2, B2), D2(y, A2, B2)), 其中: z\= Di(yi, y2, «211, <¾i2, <¾2i, <¾22, ¾i, ^22) z = (zz 2 ) = O(y, A 2 , B 2 ) = (O, (y, A 2 , B 2 ), D 2 (y, A 2 , B 2 )), where: z\= Di(yi, y2, «211, <3⁄4i2, <3⁄42i, <3⁄422, 3⁄4i, ^22)
+ +
15<72l
Figure imgf000039_0001
+
15<72l
Figure imgf000039_0001
+
2 2  twenty two
2<¾11<¾12<¾21_½ - 2(2211 <¾2 ½)/(16<¾2122621 + <¾1221b21b22 + <¾11<¾22 21 22 + 16<¾11(¾12b22 2 + 2<¾2122b2Lyi + 16(¾122ib2Zyi + 16<¾11(¾22b2Zyi + \6a22ia227yi2 +2 <¾11 <¾12 <¾21_½ - 2 (2211 <¾2 ½) / (16 <¾ 21 <¾ 22 6 21 + <¾ 12 <¾ 21 b 21 b22 + <¾11 <¾22 21 22 + 16 <¾ 11 (¾ 12 b 22 2 + 2<3⁄4 21 <3⁄4 22 b 2L yi + 16(3⁄4 12 <3⁄4 2 ib 2Z yi + 16<3⁄4 11( 3⁄4 22 b 2Z yi + \6a 22 ia227yi 2 +
16i¾1221b2L½ +
Figure imgf000039_0002
+
16i3⁄4 12 i3⁄4 21 b 2L 1⁄2 +
Figure imgf000039_0002
+
16<¾11(¾lzy2 2)) mod 1716<3⁄4 11( 3⁄4 lz y 2 2 )) mod 17
= D2(yi, «211, <¾12, <¾21, <¾22, ¾1, 22) = D 2 (yi, «211, <3⁄412, <3⁄421, <3⁄422, 3⁄41, 22)
+ 14<72l
Figure imgf000039_0003
+
+ 14<72l
Figure imgf000039_0003
+
2 2  twenty two
<¾11<¾22 21 22 + 16<2211«212¾2 + 14<¾12<¾21 + 3 <2211 «221^222^1 + 2<¾2122b2lyi +<¾11 <¾22 21 22 + 16 <2 2 11 «212¾2 + 14 <¾12 <¾ 21 + 3 <2 2 11« 221 ^ 222 ^ 1 + 2 <¾ 21 <¾ 22 b 2l yi +
16<¾1221b2Zyi + 16<¾11(¾22b2Zyi + \6a22ia227yi2 + 3<¾11(¾12<¾2ΐ_½ + 14<¾ιι2<¾2 ½ + 16 <¾ 12 <<¾2 ½ ¾ 21 b 2Z yi + 16 <¾ 11 (¾ 22 b 2Z yi + \ 6a 22 ia227yi 2 + 3 <¾ 11 (¾ 12 <¾2ΐ_½ + 14 <¾ιι 2 +
16i¾1221b2L½ +
Figure imgf000039_0004
+
16i3⁄4 12 i3⁄4 21 b 2L 1⁄2 +
Figure imgf000039_0004
+
\6a2n lxlyi (2a221 «222^212 + 15<¾i2<¾2i 2i 22 + 15a2Ua222b2ib22 + 2a2Ua2Ub22 2 + 13<¾2122b2Lyi + 2<¾1221b2Ly2 +\6a 2 n lxl yi (2a 22 1 «222^21 2 + 15<3⁄4i2<3⁄42i 2i 22 + 15a 2U a 222 b 2 ib 22 + 2a 2U a 2U b 22 2 + 13<3⁄4 21 <3⁄4 22 b 2L Yi + 2<3⁄4 12 <3⁄4 21 b 2L y 2 +
2ί¾1ΐί¾22 1_½ +
Figure imgf000039_0005
2ί7211ί¾½2)) mod
2ί3⁄41ΐί3⁄422 1_1⁄2 +
Figure imgf000039_0005
2ί7 211 ί3⁄4 1⁄2 2 )) mod
17 17
设 ?=2, 把 00 , ^ 2, :)分解成 2部分, 例如可以规定为: Let ?=2, decompose 00 , ^ 2 , :) into 2 parts, for example, it can be specified as:
D(1)(j , A2, B2) = DO , A2, β2)中的两个分子多项式, D (1) (j , A 2 , B 2 ) = two molecular polynomials in DO , A 2 , β 2 ),
O(2)(y, A2, B2) = O(y, A2, β2)中的两个分母多项式。 O (2) (y, A 2 , B 2 ) = two denominator polynomials in O(y, A 2 , β 2 ).
KDCn把上述的 D(1¾, Α2, β2)发给 KDC21, 把 D(2¾ , Α2, β2)发给 KDC22, 同时把 ID对于 4, 4, ...的映射函数, 以及 也发给它们。 KDCn sends the above D (1 3⁄4, Α 2 , β 2 ) to KDC 21 , D( 2 3⁄4 , Α 2 , β 2 ) to KDC 22 , and maps ID to 4, 4, ... The functions are also sent to them.
为某个授权用户建立私钥时, KDC21、 KDC22分别先把该用户的 ID代入 映射函数, 计算出《211, «212, «221, «222, ^1, ½, 再把它们分别代入: When establishing a private key for an authorized user, KDC 21 and KDC 22 respectively substitute the ID of the user into the mapping function, and calculate "211, «212, «221, «222, ^1, 1⁄2, and then substitute them respectively. :
«211, «212, «221, a , b2l, b22), O(2)( , a2n, 2n, a22\, «222, b2l, b22), 计算出 D(1)O 、 D(2)0 , 然后分别发送给该用户; «211, «212, «221, a , b 2l , b 22 ), O (2) ( , a 2n , 2 n, a 22 \, «222, b 2l , b 22 ), calculate D (1) O, D (2) 0 , and then sent to the user separately;
授权用户从 KDC21、 KDC22分别领取 D(1)0 、 D(2)0 , 然后按照规定的方 法还原为 DO 。 Authorized users receive D (1) 0 and D (2) 0 from KDC 21 and KDC 22 respectively, and then restore to DO according to the specified method.
上述方案中:各 KDC2,并不是由于管理制度和计算能力的制约、而是由于 缺少信息, 而无法窃取到用户的私钥; 而掌握全部秘密的 KDCu平时处于关 闭封存状态, 不直接参与建立私钥。 建议 KDCu在建立私钥生成函数时, 对 有关变量 (例如 ll, «212, «221, «222, ^1, 2) 重新命名, 可达到更好的效果。 为了实现私钥形态的个性化, 本实施例还可以进一歩包括歩骤: 在生成私 钥的过程中, 插入随机变换 w()以及逆 w- )。 In the above scheme: each KDC 2 is not restricted by the management system and computing power, but is unable to steal the user's private key due to lack of information; and the KDCu that grasps all the secrets is usually in the closed storage state and does not directly participate in the establishment. Private key. It is recommended that KDCu establish a private key generation function, Renaming variables (such as ll, «212, «221, «222, ^1, 2) can achieve better results. In order to realize the personalization of the private key form, the embodiment may further include the following steps: In the process of generating the private key, the random transform w() and the inverse w-) are inserted.
从数学角度对的私钥形态个性化描述如下:  The personalization of the private key form from a mathematical perspective is as follows:
在合成私钥 DO 的过程中, 插入随机变换 W0以及逆 W— :  In the process of synthesizing the private key DO, insert the random transform W0 and the inverse W_ :
DO) = D,(Da0)) = D.CW-^WCD^)))) = D (D,。0 ), 其中 D,fl()=W(Dfl()), D',()=D,(W-10), 把 W()、 W- )分别从 D,fl()、 D ()中分解 出来是困难的。 W()、 W^)的具体实现方法属于公知技术。 DO) = D,(D a 0)) = D.CW-^WCD^)))) = D (D, .0 ), where D, fl ()=W(D fl ()), D', ()=D, (W- 1 0), it is difficult to decompose W(), W-) from D, fl (), D (), respectively. The specific implementation method of W(), W^) is a well-known technique.
总之,实现私钥形态个性化的基本构思是:在推导 DO 的过程中插入随机 变换, 以掩盖 DO与 ID之间的相关性, 并把 R 隐藏起来; 从而使得: 对于 不同用户的私钥 D0 ,不仅其数学性质不同,而且其函数的表达形式还受到了 两种相互独立的因素一一来自 ID和随机变换一一的双重控制, 有效地提高了 抗合谋攻击能力。  In summary, the basic idea of personalization of the private key form is to insert a random transformation in the process of deriving the DO to cover the correlation between DO and ID, and hide R; thus: For the private key D0 of different users Not only is its mathematical nature different, but its function expression is also subject to two independent factors, one from ID and random transformation, which effectively improves the ability to resist collusion.
为更清楚地表述具体实施方式,下面描述一个小数据的例子,如图 9所示, 是本发明 m=U、 n=8的小数据实施例实现私钥形态个性化的数据流向图: 在
Figure imgf000040_0001
IV1之间插入随机线性 变换 W20、 W^O, 其具体歩骤如下:
In order to more clearly describe the specific embodiment, an example of a small data is described below, as shown in FIG. 9, which is a data flow diagram of the embodiment of the small data of m=U and n=8 of the present invention to realize the personalization of the private key form:
Figure imgf000040_0001
A random linear transformation W 2 0, W^O is inserted between IV 1 , and the specific steps are as follows:
第一步, 计算: The first step is to calculate:
Figure imgf000040_0002
它们均为 8元有理分式, 其分子、 分母均 为线性多项式, 分母相同。
Figure imgf000040_0002
They are all 8-ary rational fractions, and their numerator and denominator are linear polynomials with the same denominator.
第二步, 依次计算: The second step is to calculate in order:
II = DVII(M'II, is), 其为 8元 2次有理分式; II = D V II (M'II, is), which is a 8 yuan secondary rational fraction;
VI2 = DVI2(M'II, is, ii), 其为 9元 2次有理分式;VI2 = D V I 2 (M'II, is, ii), which is a 9-order 2-order rational fraction;
I3 = DVI3(M'II, … is, vii, vl2), 其为 10元 2次有理分式;I3 = D V I 3 (M'II, ... is, vii, v l2 ), which is a 10 yuan 2 rational fraction;
I4 = DVI4(M'II, … 18, Vll, Vl2, is), 其为 11元 2次有理分式; I4 = D V I 4 (M'II, ... 18, Vll, Vl2, is), which is a 11-order 2-order rational fraction;
VI5 = DVI5(M'II, i8,vn, ...,vl4), 其为 12元 2次有理分式;VI5 = D V I 5 (M'II, i8, vn, ..., v l4 ), which is a 12-member 2-order rational fraction;
I6 = DVI6(M'II, i8,vn, ..., i5), 其为 13元 2次有理分式; I6 = D V I 6 (M'II, i8, vn, ..., i 5 ), which is a 13-order 2-order rational fraction;
VI7=DVI7(¾'II, i8,vn, ...,vl6), 其为 14元 2次有理分式;VI 7 = D V I 7 (3⁄4'II, i8, vn, ..., v l6 ), which is a 14-member 2-order rational fraction;
I8 = DVI8(M'II, i8,vn, ...,vl7), 其为 15元 2次有理分式; I 8 = D V I 8 (M'II, i8, vn, ..., v l7 ), which is a 15 yuan secondary rational fraction;
上述的;ii, 在推导公式时, 代入 的变元符号; 在进行解密计算 代入 的值。 第三步, 计算: The above; ii, the argument of the substitution when deriving the formula; the value substituted in the decryption calculation. The third step is to calculate:
ζ'ΓΌζΊη, ...,ν18), 1^8, 其为 8元线性多项式; ζ' Γ Ό ζΊη , ..., ν 18 ), 1^8, which is an 8-element linear polynomial;
第四步, 依次计算:  The fourth step is to calculate in order:
Xj = OXJ(z , ...,z'8), =7,8, 其为 8元线性多项式; Xj = O XJ (z , ..., z' 8 ), =7,8, which is an 8-element linear polynomial;
(x xw, n, 12) = K2( 7, 8), 其为一组单向函数的组合; (xx w , n , 12 ) = K 2 ( 7 , 8 ), which is a combination of a set of one-way functions;
Xj = OXJ(z , ... , z'8, x% io, n, i2). l^/ 6, 其为 12元线性多项式; (wu ..., w,) =
Figure imgf000041_0001
...,x8), 其为一组单向函数的组合。
Xj = O XJ (z , ... , z' 8 , x % io, n, i 2 ). l^/ 6, which is a 12-ary linear polynomial; (w u ..., w,) =
Figure imgf000041_0001
..., x 8 ), which is a combination of a set of one-way functions.
其中, ...,z6)作为一组中间结果隐藏在第四歩的计算过程中,可理解为私钥 中的 R(x)的参数也隐藏在个性化的私钥中, 对授权用户保密。 Where ..., z 6 ) is hidden as a set of intermediate results in the calculation process of the fourth ,, which can be understood as the parameter of R(x) in the private key is also hidden in the personalized private key, for the authorized user Confidential.
当采用 "多个私钥分配中心联合建立用户私钥"时, 应使各个二级私钥分 配中心都使用相同的 W )、 ν「 。  When using "multiple private key distribution centers to jointly establish user private keys", each secondary private key distribution center should use the same W), ν".
下面从工程应用的角度, 进一歩理解密码算法的定量设计,对本发明进行 更详尽的分析。 参照图 10, 是本发明 =12、 《=8的小数据实施例的加密过程 数据流向图。  In the following, from the perspective of engineering application, the quantitative design of the cryptographic algorithm is further understood, and the present invention is analyzed in more detail. Referring to Fig. 10, there is shown a data flow diagram of an encryption process of the small data embodiment of the invention = 12 and = 8.
设《="'=8, m=12, s=2:  Let "="'=8, m=12, s=2:
(1) 根据允许的加解密出错概率, 设置足够大的 ;?。  (1) Set a sufficiently large ;? according to the allowed encryption and decryption error probability.
(2)设置合适的单向函数链, 例如其 K2部分把四个单向函数的功能合并 在一个单向函数中。 (2) Set the appropriate one-way function chain, for example, its K 2 part combines the functions of the four one-way functions into one one-way function.
(3) 设置《、 m、 T、 G应考虑以下因素:  (3) The following factors should be considered when setting ", m, T, G:
不定方程组 Ε'^Η^, ...,jv)的解集的元素数量约为 , 应大于 264。 设 3 是 E'(x)关于 X 的次数, 则一个 m 元 δ 次多项式的项的数量为
Figure imgf000041_0002
, 其反映了公钥的存储空间和加密速度, 应尽量小。
The number of elements of the solution set of the indefinite equations Ε'^Η^, ..., jv) is approximately, which should be greater than 2 64 . Let 3 be the number of times E'(x) about X, then the number of terms of an m-ary δ-degree polynomial is
Figure imgf000041_0002
, which reflects the storage space and encryption speed of the public key, should be as small as possible.
设 是 DO关于;的次数, 则一个《元 次多项式的项的数量为 C +/l, 其 反映了运用线性攻击法破译私钥的困难性, 应尽量大。实施线性攻击的条件是 已知函数 z = «Q = R , 能大批量地随机产生 (z、 对。 The number of times that DO is about; then, the number of items in the polynomial polynomial is C + / l , which reflects the difficulty of using the linear attack method to decipher the private key, and should be as large as possible. The condition for implementing a linear attack is that the known function z = « Q = R can be randomly generated in large quantities (z, right.
在基于身份方式下, 设 τ是 E'(x,ID)关于 ID1 ...,ΐ 的次数, 则一个 +r 元 次多项式的项的数量为 C^C^,其反映了公钥的存储空间和加密速度, 应尽量小。 In the identity-based mode, let τ be E'(x, ID) for the number of ID 1 ..., ΐ, then the number of items of a +r-order polynomial is C^C^, which reflects the public key Storage space and encryption speed should be as small as possible.
在基于身份方式下, 为了隐藏 ID的映射函数, 可把建立 D0 的推导过程 划分成若干段:  In the identity-based mode, in order to hide the mapping function of the ID, the derivation process of establishing D0 can be divided into several segments:
O(y)=Ok(...Ob(Oa(y))...), 并把 Dfl0, D,(), D )分别展开; 由于 ID映射到 D。0, 因此该 D。0的每 系数等价于一个关于 ID的 r元/次多项式, 该多项式的项的数量为 C
Figure imgf000042_0001
使其远大于攻击者收集大量私钥的操作能力。
O(y)=O k (...O b (O a (y))...), And expand D fl 0, D, (), D ) respectively; because the ID is mapped to D. 0, so the D. Each coefficient of 0 is equivalent to an r-ary/sub-polynomial with respect to the ID, and the number of terms of the polynomial is C.
Figure imgf000042_0001
Make it much larger than the attacker's ability to collect a large number of private keys.
设;?为 32比特, n=8, m=12, s=2, 为:  Assume;? Is 32 bits, n=8, m=12, s=2, is:
Gn: tin = ( nvn + ^112) mod/?, G — i: V = ^n -fii2 画 d
Figure imgf000042_0002
Gn: tin = ( nvn + ^112) mod/?, G — i: V = ^n -fii2 D
Figure imgf000042_0002
-1  -1
uij- ∑ ιΜ-∑ υΛ-ει Uij- ∑ ι Μ-∑ υΛ- ε ι
-1 \≤k≤h≤ j-l k=\ 1 0 0 j : vj = mod/?, j =2,...,8, -1 \≤k≤h≤ jl k=\ 1 0 0 j : v j = mod/?, j =2,...,8,
1V1J— 1 其中, 参数 hjk、
Figure imgf000042_0003
s 为二次有理分式中的系数;
1 V 1J— 1 where the parameter hjk,
Figure imgf000042_0003
s is the coefficient in the quadratic rational fraction;
G2采用如前所述的 "其非线性次数保持不变的非线性变换": G 2 uses the "non-linear transformation whose nonlinear number remains constant" as described above:
j0 + ;'1V21 +… + ^27'8V28 , J0 + ;'1 V 21 +... + ^27'8 V 28 ,
G2j: uij =― mod p , = 1, 8 G 2j : u ij =― mod p , = 1, 8
,200 + ,201 V21 + · · · + ½8V28 ,200 + ,201 V 21 + · · · + 1⁄28 V 28
G2J v2j = mod;?, = 1, -·,8G 2 J v 2j = mod;?, = 1, -·, 8
Figure imgf000042_0004
Figure imgf000042_0004
其中, G21中的系数 gy,应理解为是关于 G2中的系数½(), ..., 88的8次函数; 设 G2是 ID的 1次函数, 则 G21是 ID的 8次函数。 Wherein, G 2 - 1 gy coefficients, the coefficient to be understood as the G 2 ½ (), ..., 88 8 linear function; G 2 is disposed linear function ID, then G 2 - 1 It is the 8th function of the ID.
上述方案的有关技术指标和加解密歩骤如下:  The relevant technical indicators and encryption and decryption steps of the above schemes are as follows:
W;¾232(i2-8)= 2i28; C^ = C¾+2=91, 即 E(x)总共有 91 X 9=819个项 ( 8 个相同的分母多项式, 应算作为 1个多项式); 但在基于身份方式下, 设 τ=1, r=A, Cm d +5Cl+T =
Figure imgf000042_0005
即 E,(x, ID)共有 455 X 9 = 4095个项。 其加 密歩骤为:
W;3⁄42 32(i2-8) = 2 i28 ; C^ = C3⁄4 +2 =91, ie E(x) has a total of 91 X 9=819 items (8 identical denominator polynomials, which should be counted as 1 polynomial ); but in the identity-based mode, let τ = 1, r = A, C m d +5 Cl + T =
Figure imgf000042_0005
That is, E, (x, ID) has a total of 455 X 9 = 4095 items. The encryption steps are:
第一步, 计算 x=HO): The first step is to calculate x=HO) :
( i, ... ,x,) = Kl(wl, ...,w8), 其为一组单向函数的组合; ( i, ... , x,) = K l (w l , ..., w 8 ), which is a combination of a set of one-way functions;
(x lO, Xll, Xll) = K2(w7, w8), 其为一组单向函数的组合; (x lO, X11, Xll) = K 2 (w 7 , w 8 ), which is a combination of a set of one-way functions;
第二步, 计算 E'(x,ID): yj = Ej(xu ... , 12, ID!, ... , ID4), l ^y 8, 其为 16元 3次有理分式。 The second step is to calculate E'(x,ID): Yj = Ej(x u ... , 12 , ID!, ... , ID 4 ), l ^y 8, which is a 16-member 3rd rational fraction.
DO关于 J的次数 =255, C^+A = C¾5 = 509850594887712 ,即在已知 R(x) 的条件下进行线性攻击所需要的存储空间为: The number of DOs for J = 255, C^ + A = C3⁄4 5 = 509850594887712, that is, the storage space required for a linear attack under the condition of known R(x) is:
(C )2 =259947629107353817789888594944 > 264; 在基于身份方式下, 假设 D。0 关于;的次数为 4, 贝 ij =4 X 8=32, 完成合谋攻 击需要收集的私钥数量 = C +32 =58905。 提高该指标的主要方法是增加 r。 例如, 当 r由 4增加到 10时, = (^2 2+2(^0+1 = 1001, 即 E'(x, ID)的函 数规模仅由 4095个项增加到 1001 X 9=9009个项,但其抗合谋攻击的指标 却由 58905增加到 C¾+32 =1471442973, 增加了 24979.9倍, 相当于: 若对我国 的有 14 亿人口的公民身份证公钥密码系统进行合谋攻击, 至少需要收买 14 亿 7千万个私钥, 显然失去了进行合谋攻击的意义。 (C) 2 =259947629107353817789888594944 > 2 64 ; In an identity-based manner, assume D. 0 The number of times is 4, Bay ij = 4 X 8=32, the number of private keys that need to be collected to complete the collusion attack = C +32 = 58905. The main way to improve this indicator is to increase r. For example, when r is increased from 4 to 10, = (^ 2 2+2 (^ 0+1 = 1001, ie the function size of E'(x, ID) is only increased from 4095 items to 1001 X 9=9009 Item, but its anti-collusion attack index increased from 58905 to C3⁄4 +32 =1471442973, an increase of 24979.9 times, equivalent to: If there is a collusion attack on the national ID card public key cryptosystem of 1.4 billion people in China, at least Buying 1.47 billion private keys clearly lost the meaning of a collusion attack.
当然: 即使 D。0 关于;的次数为 4,其函数规模仍然很大。为此,优选的, 建议采用前述的 "私钥形态个性化"技术点。  Of course: even D. 0 The number of times is 4, and its function size is still large. For this reason, it is preferable to adopt the aforementioned "private key form personalization" technology point.
采用前述的优选实施例, 通过运用 ID映射的方法, 建立基于身份的工作 方式, 使得全网所有用户共用一个公钥, 为网络环境下的公钥管理带来了极大 的方便; 以及通过运用 "多个私钥分配中心合成私钥"和 "私钥形态个性化" 的方法, 提高密码系统的抗合谋攻击能力。  With the foregoing preferred embodiment, the ID mapping method is used to establish an identity-based working mode, so that all users of the entire network share a public key, which brings great convenience to the public key management in the network environment; The method of "multiple private key distribution center synthesis private key" and "private key form personalization" improves the anti-collusion attack ability of the cryptosystem.
本说明书中的各个实施例均基于同一技术构思,所以在描述时重点说明的 都是该实施例的独特之处, 各个实施例之间相同相似的部分互相参见即可。并 且, 对于系统实施例而言, 由于其基本相应于方法实施例, 所以描述的比较简 单, 相关之处参见方法实施例的部分说明即可。  The various embodiments in the present specification are based on the same technical concept, and therefore, the descriptions are all unique to the embodiments, and the same similar parts between the respective embodiments can be referred to each other. Moreover, for the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上对本发明所提供的一种用于编码和译码数字消息的方法和系统,以及 一种用于数字签名的方法和装置,进行了详细介绍, 本文中应用了具体个例对 本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本 发明的方法及其核心思想; 同时, 对于本领域的一般技术人员, 依据本发明的 思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内 容不应理解为对本发明的限制。  The foregoing provides a method and system for encoding and decoding digital messages, and a method and apparatus for digital signature provided by the present invention. Detailed descriptions of the present invention apply to the principles of the present invention and The embodiments have been described, and the description of the above embodiments is only for helping to understand the method of the present invention and its core ideas; at the same time, for those skilled in the art, according to the idea of the present invention, in the specific embodiments and application scopes There are variations, and the description is not to be construed as limiting the invention.

Claims

权 利 要 求 Rights request
1、 一种用于编码和译码数字消息的方法, 其特征在于, 包括:  A method for encoding and decoding a digital message, comprising:
选择正整数 w, n, 其中, m >n ·'  Select a positive integer w, n, where m >n ·'
生成一包含有 E(x)的公钥,其中, E(x)为在域 F上的从 ...,xm)M(yi, ..., 的非线性映射函数组; 并且, 所述 E(x)中隐含有接口函数 R(x), 其用于根 据 得到"个关于 的函数:"0(X) = (M Xi, —., Μο^, xm)) = R(x); Generating a public key containing E(x), where E(x) is a set of nonlinear mapping functions from ..., x m )M(yi, ..., on the domain F; The interface function R(x) is implicitly contained in E(x), which is used to derive "a function related to:" 0 (X) = (M Xi, —., Μο^, x m )) = R( x);
生成一与所述公钥相对应的私钥, 所述私钥包括 R(x;  Generating a private key corresponding to the public key, the private key including R (x;
设置单向函数链 HO), 以及单向函数链的逆函数 Η—  Set the one-way function chain HO), and the inverse function of the one-way function chain Η—
通过单向函数链 ΗΟ)将消息 w转换为中间结果 X, 然后采用所述公钥对 所述中间结果 X进行编码, 得到编码结果 ^ 和  Translating the message w into an intermediate result X by a one-way function chain, and then encoding the intermediate result X with the public key to obtain a coding result ^ and
采用所述私钥将编码结果 ^变换为中间结果 Z, 然后运用单向函数链的逆 函数 H— )以及私钥将中间结果 τ转换为译码消息 w。 The private result is used to transform the encoded result into an intermediate result Z, and then the intermediate result τ is converted into a decoded message w using the inverse function H_) of the one-way function chain and the private key.
2、 如权利要求 1所述的方法, 其特征在于, 通过以下歩骤得到公钥和私 钥:  2. The method of claim 1 wherein the public key and the private key are obtained by:
选取 个域 F上的《元可逆线性变换 Τ = (Tb Ti+!), 其中, 每个 包括《个域 F上的关于 的 n元线性多项式; Select the "meta-reversible linear transformation Τ = (T b T i+ !) on the domain F, where each includes the relevant n-ary linear polynomial on the domain F;
选取 S个域 F上的《元可逆非线性变换 G = (G1 其中, 每个 包括 n个域 F上的关于 的函数; Selecting the "metainvertible nonlinear transformation G = (G 1 where, each of the functions including n on the domain F);
依据预置规则, 合成所述《( Λ 、 Τ和 G, 得到从 X到 的非线性映射函 数组: (yi, ... , yn) = E( ) = (Ει( ι, ... , xm), ... , En(x ... , xm)); According to the preset rule, the "( Λ , Τ , and G, get the nonlinear mapping function group from X to: (yi, ..., y n ) = E( ) = (Ει( ι, ... , x m ), ... , E n (x ... , x m ));
依据 E(x), 得到公钥;  According to E(x), the public key is obtained;
生成 T的逆函数 T— 生成 G的逆函数 G— 由 T1和 G— 1计算得到 DO ; 生成私钥, 所述私钥包括 和 DO ; 所述私钥中的 用于同单向函数链 的逆函数 H—1 ( 一起将中间结果 z转换为译码消息 w。 Generating the inverse function T of T—generating the inverse function G of G—calculating DO from T 1 and G— 1 ; generating a private key, the private key including and DO; and the same one-way function chain in the private key The inverse function H- 1 (together the intermediate result z together into a decoded message w.
3、 如权利要求 2所述的方法, 其特征在于, 所述预置规则为:  3. The method according to claim 2, wherein the preset rule is:
把函数组《Q(x)代入到 , 把1 代入到 把 代入到 T2, 把 Τ2代入 到 G2, ..., 把1}代入到 G, ..., 把! 代入到 Gs, 把(^代入到 Ti+1Substituting the function group " Q (x) into it, substituting 1 into T 2 , substituting Τ 2 into G 2 , ..., substituting 1} into G, ..., put! Substitute into G s and substitute (^ into T i+1 ;
或者, 把函数组 代入到 , 把1 代入到 把 代入到 T2, 把 Τ2代入到 G2, ..., 把1代入到 G/, ..., 把! 代入到 GsOr, substituting the function group, substituting 1 into T 2 , substituting Τ 2 into G 2 , ..., substituting 1 into G/, ..., put! Substitute into G s .
4、 如权利要求 1所述的方法, 其特征在于, 4. The method of claim 1 wherein:
所述 中含有关于 :)的有理分式函数。  The above contains a rational fractional function for :).
5、 一种用于数字签名的方法, 其特征在于, 包括:  5. A method for digital signature, comprising:
选择正整数 n, «,, 其中, /77 >«≥«' ;  Select a positive integer n, «,, where /77 >«≥«' ;
生成一包含有 E'(x)的公钥,其中,E'(x)为在域 F上的从 ..., χη) (γι, ...,Generating a public key containing E'(x), where E'(x) is from ..., χ η ) (γι, ..., on the domain F)
J )的非线性映射函数组; 并且, 所述 Ε' 中隐含有接口函数 其用于根 据 .,XRA)得到《个关于 .,XRA)的函数:《0(X)
Figure imgf000045_0001
.. Xm), ….,^ … xm)) =R(x);
J) is non-linear mapping function group; and, said Ε 'implied the interface function according to which, X RA) to give "on a function, X RA) of:." 0 (X).
Figure imgf000045_0001
.. Xm), ....,^ ... x m )) =R(x);
生成一与所述公钥相对应的私钥, 所述私钥包括 R(x;  Generating a private key corresponding to the public key, the private key including R (x;
设置单向函数链 HO), 以及单向函数链的逆函数 Η—  Set the one-way function chain HO), and the inverse function of the one-way function chain Η—
采用所述私钥先把待签名的消息 /'变换为中间结果 Ζ, 然后运用单向函数 链的逆函数 Η—1^以及私钥将中间结果 ζ转换为数字签名 IV; 和 Using the private key to first convert the message to be signed /' into an intermediate result, and then using the inverse function Η- 1 ^ of the one-way function chain and the private key to convert the intermediate result to the digital signature IV;
通过单向函数链 HO)将数字签名 w转换为中间结果 X, 然后采用所述公 钥对所述中间结果 X进行译码, 得到译码结果 ^  The digital signature w is converted into an intermediate result X by a one-way function chain HO), and then the intermediate result X is decoded by the public key to obtain a decoding result.
比较译码结果 和待验证的消息 , 根据比较结果确定数字签名 w是否 正确。  Comparing the decoded result with the message to be verified, it is determined whether the digital signature w is correct based on the comparison result.
6、 如权利要求 5所述的方法, 其特征在于, 通过以下歩骤得到公钥和私 钥:  6. The method of claim 5, wherein the public key and the private key are obtained by the following steps:
选取 个域 F上的《元可逆线性变换 T = (Tb Ti+!), 其中, 每个 包括《个域 F上的关于 的 n元线性多项式; Select the meta-reversible linear transformation T = (T b T i+ !) on the domain F, where each includes the relevant n-ary linear polynomial on the domain F;
选取 S个域 F上的《元可逆非线性变换 G = (G1 其中, 每个 包括 n个域 F上的关于 的函数; Selecting the "metainvertible nonlinear transformation G = (G 1 where, each of the functions including n on the domain F);
依据预置规则, 合成所述《« Λ 、 Τ和 G, 得到从 X到 的非线性映射函 数组: (yi, ... , yn) = E( ) = (Ει( ι, ... , xm), ... , En(x ... , xm)); According to the preset rules, the "« 、 , Τ and G are synthesized, and the nonlinear mapping function group from X is obtained: (yi, ..., y n ) = E( ) = (Ει( ι, ... , x m ), ... , E n (x ... , x m ));
选取其中的《'个函数作为 E'(x), 得到公钥;  Select "the function as E'(x) to get the public key;
生成 T的逆函数 T— 生成 G的逆函数 G— 由 T1和 G— 1计算得到 DO ; 生成私钥, 所述私钥包括 和 DO ; 所述私钥中的 用于同单向函数链 的逆函数 H—1 ( 一起将中间结果 z转换为译码消息 w。 Generating the inverse function T of T—generating the inverse function G of G—calculating DO from T 1 and G— 1 ; generating a private key, the private key including and DO; and the same one-way function chain in the private key The inverse function H- 1 (together the intermediate result z together into a decoded message w.
7、 如权利要求 6所述的方法, 其特征在于, 所述预置规则为:  7. The method according to claim 6, wherein the preset rule is:
把函数组《Q(x)代入到 , 把1 代入到 把。代入到 T2, 把 Τ2代入 到 G2, ..., 把!代入到 ■, ..., 把! 代入到 Gs, 把(^代入到 Ti+1; 或者, 把函数组 代入到 , 把1 代入到 把 代入到 T2, 把 Τ2代入到 G2, ..., 把 1}代入到 G, ..., 把 代入到 GsSubstituting the function group " Q (x) into it, and substituting 1 into the handle. Substituting into T 2 , substituting Τ 2 into G 2 , ..., put! Substitute into ■, ..., put! Substitute into G s and substitute (^ into T i+1 ; Alternatively, substituting the function group, substituting 1 into T 2 , substituting Τ 2 into G 2 , ..., substituting 1} into G, ..., substituting into G s .
8、 如权利要求 5所述的方法, 其特征在于,  8. The method of claim 5, wherein
所述 Ε' 中含有关于 :)的有理分式函数。  The Ε' contains a rational fractional function for :).
9、 一种用于编码和译码数字消息的方法, 其特征在于, 包括:  9. A method for encoding and decoding a digital message, comprising:
选择正整数 w, n , n r, 其中, m > n≥ r ;  Select a positive integer w, n , n r, where m > n≥ r ;
生成一包含有 E'(x, ID)的公钥,其中, E'(x, ID)为在域 F上的从 ... , xm, IDb ..., IDr)ilJ(y!, ..., jv)的非线性映射函数组, 所述 ID = ( ID1; ..., ID 为授权 用户的身份标识; 并且, 所述 E'(x, ID)中隐含有接口函数 R(x), 其用于根据 ( i, 得到《个关于 —., )的函数: u0(x) = ( 0i(Xi , . . Xm), —. , Μο^, xm)) = R(x); Generate a public key containing E'(x, ID), where E'(x, ID) is from ..., x m , ID b ..., ID r ) ilJ(y) on domain F a non-linear mapping function group of !, ..., jv), the ID = (ID 1; ..., ID is an identity of the authorized user; and, the E'(x, ID) is implicitly contained The interface function R(x), which is used to get a function of (i, about -., ) according to (i, u 0 (x) = ( 0 i(Xi , . . Xm), —. , Μο^, x m )) = R(x);
针对身份标识为 π 的授权用户, 生成一与该身份标识相对应的私钥, 所述私钥包括 R ;  Generating a private key corresponding to the identity identifier for the authorized user whose identity is π, where the private key includes R;
设置单向函数链 HO), 以及单向函数链的逆函数 Η—  Set the one-way function chain HO), and the inverse function of the one-way function chain Η—
采用所述公钥、 单向函数链 HO)和 Π , 对消息 进行编码, 得到编 码消息 Ν 采用所述私钥和单向函数链的逆函数 Η— 对该编码消息 N进行译 码, 得到译码消息  Using the public key, the one-way function chain HO) and Π, encoding the message to obtain an encoded message, using the inverse function of the private key and the one-way function chain 译码 - decoding the encoded message N to obtain a translation Code message
和 /或, 采用所述私钥和单向函数链的逆函数 Η— 对消息 进行编码, 得到编码消息 采用所述公钥、单向函数链 HO)和 ID(^),对该编码消息 N' 进行译码, 得到译码消息 7 。  And/or, using the inverse function of the private key and the one-way function chain 编码 - encoding the message, obtaining the encoded message using the public key, the one-way function chain HO) and the ID (^), the encoded message N ' Decode, get the decoded message 7 .
10、 如权利要求 9所述的方法, 其特征在于, 通过以下歩骤得到公钥和私 钥:  10. The method of claim 9, wherein the public key and the private key are obtained by the following steps:
选取 个域 F上的《元可逆线性变换 T = (Tb Ti+!), 其中, 每个 包括《个域 F上的关于 的 n元线性多项式; Select the meta-reversible linear transformation T = (T b T i+ !) on the domain F, where each includes the relevant n-ary linear polynomial on the domain F;
选取 s个域 F上的《元可逆非线性变换 G = (G1 :), 其中, 每个 包括 n个域 F上的关于 的函数; Selecting the meta-reversible nonlinear transformation G = (G 1 :) on s fields F, where each includes a function on the n domains F;
所述 T和 /或 G中的至少一个系数为 ID的映射函数;  At least one of the coefficients of T and / or G is a mapping function of an ID;
依据预置规则, 合成所述《« Λ 、 T和 G, 得到从 x、 ID到; 的非线性映 射函数组: (yi,— ., y») =E(x, ID) = (E^,— ., xm, IDh— .JD , E^,— ., xm, IDi,...,IDr)); According to the preset rules, the "« 、 , T and G are obtained, and the nonlinear mapping function group from x, ID to ; is obtained: (yi, — ., y») = E(x, ID) = (E^ , — . , x m , IDh — .JD , E^, — ., x m , IDi,...,ID r )) ;
选取 E(x, ID)中的《'个函数作为 E'(x, ID), 得到公钥; 生成 T的逆函数 T1; 生成 G的逆函数 G— 把授权用户的身份标识的值 代入 T— 1和 G— 1, 计算得到该身份标识相关的 DO ; 生成与该身份标识相对应 的私钥, 所述私钥包括 和 D0 。 Select "' function as E' (x, ID) in E(x, ID) to get the public key; Generating an inverse function T 1 of T; generating an inverse function G of G - substituting the value of the authorized user's identity into T- 1 and G- 1 , calculating the DO associated with the identity; generating a private corresponding to the identity Key, the private key includes and D0.
11、 如权利要求 9所述的方法, 其特征在于, 通过以下歩骤得到公钥和私 钥:  11. The method of claim 9, wherein the public key and the private key are obtained by the following steps:
设置由 X到 的可逆非线性映射函数组:(y1...,yn) =E( , ID) = (Έ^,...,xm, ID1... ,IDr), ... , E„(xh...,xm, IDh ... ,IDr)); Set the set of reversible nonlinear mapping functions from X to: (y 1 ..., y n ) = E( , ID) = (Έ^,...,x m , ID 1 ... , ID r ), ... , E„(x h ..., x m , ID h ... , ID r )) ;
依据 E(x,ID)的逆函数, 生成私钥;  Generating a private key according to the inverse function of E(x, ID);
选取 E(x, ID)中的《'个函数作为 E'(x, ID), 得到公钥  Select "' function as E'(x, ID) in E(x, ID) to get the public key
当用于加解密过程时, m >n = r 。 When used in the encryption and decryption process, m > n = r.
12、 如权利要求 9、 10或 11所述的方法, 其特征在于, 通过以下歩骤建 立私钥:  12. A method as claimed in claim 9, 10 or 11, characterized in that the private key is established by the following steps:
计算得到 D0 , 所述 DO 与 ID相关;  Calculating D0, the DO is related to the ID;
将所述 DO 分为至少两个部分,保存在至少两个私钥分配中心,每个部分 都与 ID相关;  Dividing the DO into at least two parts, stored in at least two private key distribution centers, each part being associated with an ID;
各私钥分配中心根据授权用户的 ID计算得到私钥的一部分, 发送给该用 户;  Each private key distribution center calculates a part of the private key according to the ID of the authorized user, and sends it to the user;
该用户将私钥的各个部分合成, 计算得到私钥。  The user synthesizes the various parts of the private key and calculates the private key.
13、 一种用于编码和译码数字消息的系统, 其特征在于, 包括:  13. A system for encoding and decoding digital messages, comprising:
公钥生成单元, 用于生成一包含有 的公钥, 其中, 为在域 F上的 从 ..., )到(^, 的非线性映射函数组, m, "为正整数, m > 并且, 所述 中隐含有接口函数 ,其用于根据 :)得到《个关于 ...,xm) 的函数: "Q(X) = ΟΙ(Χ , ...,xm), ..., u0n(xi, ...,xm) =R(x); a public key generating unit, configured to generate an included public key, where, from (...) to (^, the non-linear mapping function group of the ^, ", is a positive integer, m > and The implicitly contains an interface function for obtaining a function of "a", x m ) according to :): "Q(X) = ΟΙ(Χ , ..., x m ), .. ., u 0n (xi, ..., x m ) = R(x);
私钥生成单元,用于生成一与所述公钥相对应的私钥,所述私钥包括 R(x); 单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— a private key generating unit, configured to generate a private key corresponding to the public key, the private key including R(x) ; a one-way function chain determining unit, configured to set a one-way function chain HO), and a one-way The inverse function of the function chain H—
加密单元, 用于通过单向函数链 HO)将消息 w转换为中间结果 X, 采用 所述公钥对所述中间结果 X进行编码, 得到编码结果 J; 和  An encryption unit, configured to convert the message w into an intermediate result X by a one-way function chain HO), and encode the intermediate result X by using the public key to obtain a coding result J;
解密单元, 用于采用所述私钥将编码结果 J变换为中间结果 z, 运用单向 函数链的逆函数 H—1^)以及私钥将中间结果 z转换为译码消息 w。 And a decryption unit, configured to convert the encoding result J into an intermediate result z by using the private key, convert the intermediate result z into a decoding message w by using an inverse function H- 1 of the one-way function chain and a private key.
14、 一种用于数字签名的系统, 其特征在于, 包括: 公钥生成单元, 用于生成一包含有 Ε' 的公钥, 所述 Ε' 为在域 F上的 从 :)到 , ..., .)的非线性映射函数组; 并且, 所述 Ε'(χ)中隐含有接 口函数 R(x), 其用于根据 xra:)得到"个关于 :)的函数: Wo = (u0 (x , ...,xm), ...,u0n(x , ...,xm) =R( ); 其中, m, n, "'为正整数, m>n> r ; 14. A system for digital signature, comprising: a public key generating unit, configured to generate a public key containing Ε', which is a non-linear mapping function group from :) to , ..., .) on the domain F; '(χ) implicitly contains the interface function R(x), which is used to get a "about:" function according to x ra :): Wo = (u 0 (x , ..., x m ), .. , u 0n (x , ..., x m ) = R( ); where m, n, "' is a positive integer, m > n >r;
私钥生成单元,用于生成一与所述公钥相对应的私钥,所述私钥包括 R(x); 单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— a private key generating unit, configured to generate a private key corresponding to the public key, the private key including R(x) ; a one-way function chain determining unit, configured to set a one-way function chain HO), and a one-way The inverse function of the function chain H—
签名单元, 用于采用所述私钥先把待签名的消息 /'变换为中间结果 z, 运 用单向函数链的逆函数 H—1 ( 以及私钥将中间结果 z转换为数字签名 IV; 以及 验证单元, 用于通过单向函数链 HO)将数字签名 w转换为中间结果 X, 采用所述公钥对所述中间结果 X进行译码, 得到译码结果 ^ 以及, 比较译码 结果 J和待验证的消息 , 根据比较结果确定数字签名 w是否正确。 a signature unit, configured to convert the message to be signed/' into an intermediate result z by using the private key, and use an inverse function H- 1 of the one-way function chain (and a private key to convert the intermediate result z into a digital signature IV; a verification unit, configured to convert the digital signature w into an intermediate result X by a one-way function chain HO), decode the intermediate result X by using the public key, obtain a decoding result, and compare the decoding result J and The message to be verified determines whether the digital signature w is correct based on the comparison result.
15、 一种用于编码和译码数字消息的系统, 其特征在于, 至少包括: 公钥生成单元,用于生成一包含有 E'(x, ID)的公钥,所述 E'(x, ID)为在域 A system for encoding and decoding a digital message, comprising: a public key generating unit, configured to generate a public key including E'(x, ID), the E' (x) , ID) for the domain
F上的从 IDb ..., IDr)ilJ(y!, j )的非线性映射函数组, 所述 ID = (ID1; ...,ID 为授权用户的身份标识; 并且, 所述 E'(x, ID)中隐含有接口函数 R(x),其用于根据 ( i, 得到"个关于 (χι, ..., )的函数:《( :) : ^^·^, xm), u0n(x , ...,xm) =R(x); 其中, m, n, r , r为正整数, m>n>n' ; 私钥生成单元, 用于针对身份标识为 Π 的授权用户, 生成一与该身份 标识相对应的私钥, 所述私钥包括 R ; a set of nonlinear mapping functions from ID b ..., ID r ) ilJ(y!, j ) on F, said ID = (ID 1; ..., ID is the identity of the authorized user; and, The E'(x, ID) implicitly contains the interface function R(x), which is used to get a function about (χι, ..., ) according to (i, "( :) : ^^·^ , x m ), u 0n (x , ..., x m ) =R(x); where m, n, r , r are positive integers, m>n>n'; private key generation unit, for Generating a private key corresponding to the identity identifier for the authorized user whose identity is ,, the private key including R;
单向函数链确定单元, 用于设置单向函数链 HO), 以及单向函数链的逆 函数 H— 以及至少包括加解密单元和签名验证单元中的一个, 其中,  a one-way function chain determining unit for setting a one-way function chain HO), and an inverse function H− of the one-way function chain, and at least one of an encryption/decryption unit and a signature verification unit, wherein
所述加解密单元, 用于采用所述公钥、 单向函数链 HO)和 ID(^), 对消息 M进行编码, 得到编码消息 N; 采用所述私钥和单向函数链的逆函数 H— )对 该编码消息 N进行译码, 得到译码消息 ;  The encryption and decryption unit is configured to encode the message M by using the public key, the one-way function chain HO) and the ID (^) to obtain an encoded message N; and adopt an inverse function of the private key and the one-way function chain H-) decoding the encoded message N to obtain a decoded message;
所述签名验证单元, 用于采用所述私钥和单向函数链的逆函数 对消 息 进行编码,得到编码消息 采用所述公钥、单向函数链 HO)和 ID(^), 对该编码消息 N'进行译码, 得到译码消息 Γ。  The signature verification unit is configured to encode the message by using the inverse function of the private key and the one-way function chain, and obtain the encoded message by using the public key, the one-way function chain HO) and the ID (^), and the encoding The message N' is decoded to obtain a decoded message.
PCT/CN2007/070264 2007-06-07 2007-07-10 Method and system for encoding and decoding the digital message WO2008148275A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710100306.4 2007-06-07
CN200710100306.4A CN101321058B (en) 2007-06-07 2007-06-07 Method and system for encoding and decoding digital message

Publications (1)

Publication Number Publication Date
WO2008148275A1 true WO2008148275A1 (en) 2008-12-11

Family

ID=40093147

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/070264 WO2008148275A1 (en) 2007-06-07 2007-07-10 Method and system for encoding and decoding the digital message

Country Status (2)

Country Link
CN (1) CN101321058B (en)
WO (1) WO2008148275A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8930808B2 (en) 2011-07-21 2015-01-06 International Business Machines Corporation Processing rich text data for storing as legacy data records in a data storage system

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783728B (en) * 2009-01-19 2012-12-19 吉林大学 Public key encryption method for ergodic matrix over hidden field
JP5790287B2 (en) * 2011-08-12 2015-10-07 ソニー株式会社 Information processing apparatus, information processing method, program, and recording medium
CN103117851A (en) * 2011-11-17 2013-05-22 银视通信息科技有限公司 Encryption control method and device capable of achieving tamper-proofing and repudiation-proofing by means of public key infrastructure (PKI)
CN109861821B (en) * 2019-02-26 2020-10-30 清华大学 Error coordination method for LWE public key password
CN110278206B (en) * 2019-06-19 2021-10-08 董玺 BWE encryption algorithm based on double private keys
CN111404557B (en) * 2020-03-15 2021-09-24 中国地质大学(武汉) Quick decoding method, equipment and storage equipment
US11522674B1 (en) * 2021-09-09 2022-12-06 Aires Investment Holdings Private Limited Encryption, decryption, and key generation apparatus and method involving diophantine equation and artificial intelligence

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427575A (en) * 2001-12-17 2003-07-02 北京兆日科技有限责任公司 Electronic cipher formation and checking method
CN1602643A (en) * 2001-10-16 2005-03-30 高通股份有限公司 Method and apparatus for providing privacy of user identity and characteristics in a communication system
CN1801029A (en) * 2004-12-31 2006-07-12 联想(北京)有限公司 Method for generating digital certificate and applying the generated digital certificate
CN1859246A (en) * 2005-11-02 2006-11-08 华为技术有限公司 Copyright managing method for digit household network and digital household network system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100452695C (en) * 2002-11-29 2009-01-14 北京华大信安科技有限公司 Elliptic curve encryption and decryption method and apparatus
EP1480371A1 (en) * 2003-05-23 2004-11-24 Mediacrypt AG Device and method for encrypting and decrypting a block of data
CN1547342A (en) * 2003-12-04 2004-11-17 郑建德 Public key cryptography algorithm based on problem of classical decomposition of matrix over integral ring
CN100535962C (en) * 2004-05-12 2009-09-02 松下电器产业株式会社 Encryption system, encryption device, decryption device, program, and integrated circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1602643A (en) * 2001-10-16 2005-03-30 高通股份有限公司 Method and apparatus for providing privacy of user identity and characteristics in a communication system
CN1427575A (en) * 2001-12-17 2003-07-02 北京兆日科技有限责任公司 Electronic cipher formation and checking method
CN1801029A (en) * 2004-12-31 2006-07-12 联想(北京)有限公司 Method for generating digital certificate and applying the generated digital certificate
CN1859246A (en) * 2005-11-02 2006-11-08 华为技术有限公司 Copyright managing method for digit household network and digital household network system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8930808B2 (en) 2011-07-21 2015-01-06 International Business Machines Corporation Processing rich text data for storing as legacy data records in a data storage system

Also Published As

Publication number Publication date
CN101321058A (en) 2008-12-10
CN101321058B (en) 2010-12-15

Similar Documents

Publication Publication Date Title
CN108418686B (en) Multi-distributed SM9 decryption method and medium, and key generation method and medium
Jirwan et al. Review and analysis of cryptography techniques
CN109462481B (en) Secret signcryption method based on asymmetric bilinear pairings
Almajed et al. SE-ENC: A secure and efficient encoding scheme using elliptic curve cryptography
WO2008148275A1 (en) Method and system for encoding and decoding the digital message
CN110138543B (en) Blind signcryption method under lattice public key cryptosystem
WO2009026771A1 (en) The method for negotiating the key, encrypting and decrypting the information, signing and authenticating the information
WO2005078991A1 (en) A method of multi- centric identity-based key management
Zhang et al. Efficient fully homomorphic encryption from RLWE with an extension to a threshold encryption scheme
Abdullah et al. Security improvement in elliptic curve cryptography
Emmanuel et al. A note on time and space complexity of rSA and ElGamal cryptographic algorithms
Mi et al. Oblivious transfer based on NTRUEncrypt
CN103812658A (en) Stream cipher based secure communication protocol
WO2008148276A1 (en) Method and system for encoding and decoding the digital messages
CN102064938B (en) One is based on multivariate and probabilistic public key encryption method
WO2008148274A1 (en) A method and system for coding and decoding digital message
Ahila et al. State of art in homomorphic encryption schemes
Walia Cryptography Algorithms: A Review
CN108494556A (en) A kind of method of efficient RSA Algorithm encrypting metadata file
Sheth et al. Analysis of cryptography techniques
KR20200055672A (en) Encryption systems and method using permutaion group based cryptographic techniques
CN113904777B (en) SM2 digital signature algorithm-based signcryption method
Memon et al. Randomized text encryption: A new dimension in cryptography
Bressler A Prime Look Into the Field of Cryptography
Datta Zero knowledge one time digital signature scheme

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07764192

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07764192

Country of ref document: EP

Kind code of ref document: A1