JP6040780B2 - Cryptographic processing apparatus, method and program - Google Patents

Cryptographic processing apparatus, method and program Download PDF

Info

Publication number
JP6040780B2
JP6040780B2 JP2013004977A JP2013004977A JP6040780B2 JP 6040780 B2 JP6040780 B2 JP 6040780B2 JP 2013004977 A JP2013004977 A JP 2013004977A JP 2013004977 A JP2013004977 A JP 2013004977A JP 6040780 B2 JP6040780 B2 JP 6040780B2
Authority
JP
Japan
Prior art keywords
character string
character
similar
string
input
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP2013004977A
Other languages
Japanese (ja)
Other versions
JP2014137423A (en
Inventor
郁也 森川
郁也 森川
竜介 益岡
竜介 益岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2013004977A priority Critical patent/JP6040780B2/en
Publication of JP2014137423A publication Critical patent/JP2014137423A/en
Application granted granted Critical
Publication of JP6040780B2 publication Critical patent/JP6040780B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、暗号処理装置、方法およびプログラムに関する。   The present invention relates to a cryptographic processing apparatus, method, and program.

昨今、情報通信技術の進展により、電子計算機が他の電子計算機と相互に接続されて運用されることが非常に多くなった。これに伴い、電子計算機やその中で扱われるデータが正当な所有者や利用者以外からアクセスされる機会や、通信や処理のためにそうしたデータを他の計算機に預ける機会も増えた。このため、元のデータを秘匿したままで比較などの操作を可能とする技術が考案され、利用されている。   In recent years, with the progress of information and communication technology, it has become extremely frequent that electronic computers are interconnected with other electronic computers. Along with this, there has been an increase in opportunities for electronic computers and data handled in them to be accessed by persons other than authorized owners and users, and for depositing such data to other computers for communication and processing. For this reason, a technique that enables operations such as comparison while keeping the original data secret has been devised and used.

そうした技術の一つに、暗号学的ハッシュ関数(以下では、単にハッシュ関数と呼ぶこともある)を利用する暗号処理装置がある。
ハッシュ関数とは、任意のデータ(元データ)に作用させると、固定長のハッシュ値と呼ばれる別のデータに変換する写像として定義される。つまり、暗号学的ハッシュ関数は、同じ元データを常に同じハッシュ値に変換するが、異なる元データはほとんどの場合、同じハッシュ値に変換しない。「良い」ハッシュ関数は、元データの規則的な変化(たとえば数値の連続的な増減、特定のビットの反転など)に対して、対応するハッシュ値が乱雑な変化をするものである。
One such technique is a cryptographic processing device that uses a cryptographic hash function (hereinafter, sometimes simply referred to as a hash function).
A hash function is defined as a mapping that, when applied to arbitrary data (original data), converts it into another data called a fixed-length hash value. That is, the cryptographic hash function always converts the same original data to the same hash value, but in most cases, different original data does not convert to the same hash value. A “good” hash function is a function in which a corresponding hash value undergoes random changes in response to regular changes in original data (for example, continuous increase / decrease in numerical values, inversion of specific bits, etc.).

暗号学的ハッシュ関数とは、ハッシュ関数のうちハッシュ値の乱雑度や変換の一方向性が非常に強く、安全性の高いものを指す。つまり、元データを知らずにハッシュ値だけを見て元データを導き出したり、複数のハッシュ値だけを見てそれらの元データ間の関係や規則性を見出したりすることが不可能または非常に困難なものを指す。暗号学的ハッシュ関数として働く代表的なアルゴリズムとして、MD5、SHA−1、SHA−2などが知られている。   The cryptographic hash function refers to a hash function that has very strong randomness of the hash value and one-way conversion, and is highly secure. In other words, it is impossible or extremely difficult to derive the original data by looking at only the hash value without knowing the original data, or finding the relationship or regularity between the original data by looking at only the plurality of hash values. Refers to things. MD5, SHA-1, SHA-2, and the like are known as typical algorithms that function as cryptographic hash functions.

暗号学的ハッシュ関数は、安全性をもつことから、セキュリティを高める用途にしばしば使われる。たとえば、ディジタル署名やメッセージ認証コード (MAC)、パスワード認証などに使われている。このうちパスワード認証の用途では、ユーザが正規ユーザであるかどうかを判定するために、予め登録されているパスワードのハッシュ値と、ユーザが入力したハッシュ値を比較し、一致すればそのユーザを正規ユーザと判定する。   Cryptographic hash functions are often used for security purposes because they are secure. For example, it is used for digital signatures, message authentication codes (MAC) and password authentication. Of these, for password authentication, in order to determine whether the user is a regular user, the hash value of the password registered in advance is compared with the hash value entered by the user. Determine user.

特開2010−237653公報JP 2010-237653 A

RFC 2104「HMAC: Keyed-Hashing for Message Authentication」RFC 2104 “HMAC: Keyed-Hashing for Message Authentication”

暗号化されていない2つの元データについて、2つのデータに暗号学的ハッシュ関数を作用させて得られる2つの暗号化データを比較する場合、元データが少しでも異なるとハッシュ値はまったく異なる値になるため、元データが類似していることを知ることができない。よって、ハッシュ関数を用いて暗号化をする場合、2つの元データが互いに類似しているのか否かを、暗号化データを比較しても分からないという問題がある。   When comparing two encrypted data obtained by applying a cryptographic hash function to the two data for the two unencrypted original data, the hash value will be completely different if the original data is slightly different. Therefore, it cannot be known that the original data is similar. Therefore, when encryption is performed using a hash function, there is a problem that it cannot be determined whether or not two original data are similar to each other even if the encrypted data are compared.

たとえば、ユーザが正規ユーザであるかどうかを判定するために、予め登録されているパスワードのハッシュ値と、ユーザが入力したハッシュ値を比較する場合、正しいユーザが1文字違いのパスワードを所定の回数だけ誤って入力すると、アカウントロックが起こってしまう。アカウントロックが起こると、ロックを外すためには、管理者による解除が必要であったりと、パスワードを再び受け付けることが可能となるためには、時間と手間を要するという問題がある。また、アカウントロックが生じると、パスワードに対応する識別子(ID)で特定されるユーザのデータが消去されることがあるという問題がある。   For example, in order to determine whether or not a user is a regular user, when comparing a hash value of a password registered in advance with a hash value input by the user, a correct user sets a password different in one character a predetermined number of times. If you enter it incorrectly, account lock will occur. When an account lock occurs, there are problems that it is necessary for the administrator to release the lock and that it takes time and effort to accept the password again. In addition, when an account lock occurs, there is a problem that user data specified by an identifier (ID) corresponding to a password may be erased.

パスワード認証の場合、正規ユーザが誤ったパスワードを入力する場合、入力されたパスワードは、部分的な文字列が一致するなど、正しいパスワードの「近傍」にあることが多い。ここで2つの文字列が互いに「近傍」にあるとは、全体の文字列の比較的高い割合の部分が一致することである。逆に、セキュリティを破ってログインしようとする攻撃者から入力されるパスワードが、正しいパスワードの近傍にあるケースは多くない。もし、上記の2つの状況が区別できれば、正規ユーザであるにも関わらず、連続してパスワードを誤った状況を検出できるが、そのような方法がないという問題がある。   In the case of password authentication, when an authorized user inputs an incorrect password, the input password is often “near” the correct password, for example, a partial character string matches. Here, that two character strings are “near each other” means that a relatively high portion of the entire character string matches. On the other hand, there are not many cases where the password entered by an attacker who tries to login after breaking the security is in the vicinity of the correct password. If the above two situations can be distinguished, it is possible to detect a situation in which a password is erroneously detected in spite of being a regular user, but there is a problem that there is no such method.

よって、一つの側面として、本発明は、2つの入力文字列が「近傍」にあるか否かを示す類似度を、秘匿したまま比較する装置、方法を提供することを目的とする。   Therefore, as one aspect, an object of the present invention is to provide an apparatus and a method for comparing similarities indicating whether or not two input character strings are in the “neighborhood” while keeping them secret.

第1と第2の入力文字列が「近傍」にあるか否かを示す類似度を、秘匿したまま比較する暗号処理装置が提供される。暗号処理装置は、第1の入力文字列に任意の文字として使用される第1のワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記第1のワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成する第1の類似文字列生成部と、前記第1の類似文字列を暗号化関数に作用させて第1の比較暗号値を生成する第1の暗号化部と、第2の入力文字列に任意の文字として使用される第2のワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記第2のワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成する第2の類似文字列生成部と、前記第2の類似文字列に前記暗号化関数を作用させて第2の比較暗号値を生成する第2の暗号化部と、前記第1の比較暗号値と前記第2の比較暗号値を比較して、前記第1の入力文字列と前記第2の入力文字列の類似度を判定する類似暗号比較部とを含む。 There is provided an encryption processing apparatus that compares similarities indicating whether or not first and second input character strings are in the “neighborhood” while keeping them secret. The cryptographic processing device receives a character string obtained by inserting a first wildcard character used as an arbitrary character in a first input character string, or at least one character of the first input character string. A first similar character string group generation unit that generates a character string obtained by substituting one wildcard character as a first similar character string, and an encryption function that operates the first similar character string. A first encryption unit that generates a first comparison cipher value and a character string obtained by inserting a second wildcard character used as an arbitrary character into the second input character string, or A second similar character string group generation unit that generates a character string obtained by replacing at least one character of the two input character strings with the second wildcard character as a second similar character string; Apply the encryption function to similar strings A second encryption unit that generates a second comparison cipher value, and compares the first comparison cipher value with the second comparison cipher value to obtain the first input character string and the second And a similar encryption comparison unit that determines the similarity of the input character strings.

実施形態の暗号処理装置および方法では、2つの文字列のハッシュ値、たとえば正規のパスワードと入力されたパスワードのハッシュ値を比較することによって、その2つの文字列が「近傍」にあるかどうかを判定することができるという効果を奏する。   In the cryptographic processing apparatus and method according to the embodiment, by comparing the hash value of two character strings, for example, the hash value of the entered password with the regular password, it is determined whether the two character strings are in the “neighborhood”. There is an effect that it can be determined.

パスワード認証の概略を説明する図である。It is a figure explaining the outline of password authentication. 正規ユーザからのオンライン総当り攻撃を受けたときの状況の例を示す図である。It is a figure which shows the example of a condition when receiving the online brute force attack from a regular user. 攻撃者からのオンライン総当り攻撃を受けたときの状況の例を示す図である。It is a figure which shows the example of a condition when receiving the online brute force attack from the attacker. オンライン総当り攻撃に対する対策の一つとしての平文比較方式の例を示す図である。It is a figure which shows the example of the plaintext comparison system as one of the countermeasures against an online brute force attack. オンライン総当り攻撃に対する対策の一つとして、近傍文字列すべてのハッシュ値を取っておく方法の例を示す図である。It is a figure which shows the example of the method of taking the hash value of all the neighborhood character strings as one of the countermeasures against an online brute force attack. オンライン総当り攻撃に対する対策の一つとして、近傍文字列すべてのハッシュ値を取っておく方法の別の例を示す図である。It is a figure which shows another example of the method of taking the hash value of all the neighborhood character strings as one of the countermeasures against an online brute force attack. 開示の実施形態にしたがう近傍ハッシュの生成方法の例の概略を示す図である。FIG. 6 is a diagram illustrating an outline of an example of a neighborhood hash generation method according to an embodiment of the disclosure. 近傍ハッシュの生成方法の例を示す図である。It is a figure which shows the example of the production | generation method of neighborhood hash. 暗号システムの機能ブロックの例を示す図である。It is a figure which shows the example of the functional block of a cryptographic system. 図8の類似ハッシュ生成部の機能ブロックの例を示す図である。It is a figure which shows the example of the functional block of the similar hash production | generation part of FIG. 図8の類似ハッシュ比較部の機能ブロックの例を示す図である。It is a figure which shows the example of the functional block of the similar hash comparison part of FIG. 類似ハッシュデータの例を示す図である。It is a figure which shows the example of similar hash data. 暗号処理装置または、第1の類似ハッシュ生成部、第2の類似ハッシュ生成部、および/もしくは類似ハッシュ比較部の構成の例を示す構成図である。It is a block diagram which shows the example of a structure of a cryptographic processing apparatus or a 1st similar hash production | generation part, a 2nd similar hash production | generation part, and / or a similar hash comparison part. 類似文字列生成処理での処理の流れを示すフローチャートの例である。It is an example of the flowchart which shows the flow of a process in a similar character string production | generation process. 1文字増減に対応した類似文字列生成処理での処理の流れを示すフローチャートの例である。It is an example of the flowchart which shows the flow of a process in the similar character string production | generation process corresponding to 1 character increase / decrease. 2文字増減に対応した類似文字列生成処理での処理の流れを示すフローチャートの例である。It is an example of the flowchart which shows the flow of the process in the similar character string production | generation process corresponding to 2 character increase / decrease. 比較処理での処理の流れを示すフローチャートの例である。It is an example of the flowchart which shows the flow of a process in a comparison process.

以下では、第1と第2の入力文字列が「近傍」にあるか否かを示す類似度を、秘匿したまま比較する暗号処理装置、方法およびプログラムが提供される。ここで2つの文字列が互いに「近傍」にあるとは、全体の文字列の比較的高い割合の部分が一致することである。   In the following, there will be provided a cryptographic processing device, method and program for comparing the degree of similarity indicating whether or not the first and second input character strings are in the “neighborhood” while keeping them secret. Here, that two character strings are “near each other” means that a relatively high portion of the entire character string matches.

本明細書ではハッシュ関数のうち暗号学的ハッシュ関数だけを扱うので、以下では、特に断りのない限り、暗号学的ハッシュ関数、暗号学的ハッシュ値をそれぞれ単にハッシュ関数、ハッシュ値と呼ぶものとする。また、以下では用語「ハッシュ」と「ハッシュ値」を同等に扱うことがある。   In this specification, only the cryptographic hash function is dealt with among the hash functions. Therefore, unless otherwise specified, the cryptographic hash function and the cryptographic hash value are simply referred to as a hash function and a hash value, respectively. To do. Hereinafter, the terms “hash” and “hash value” may be treated equally.

また、ハッシュ関数の入力となるデータは任意のバイト列だが、以降では便宜的に任意個の文字が並んだ文字列として説明する。実際には、ASCII文字列のように1文字が1バイトに対応したデータとしてもよいし、文字列を文字符号化した結果のバイト列を元データとしてハッシュ関数に入力してもよい。   In addition, although the data serving as the input of the hash function is an arbitrary byte string, it will be described below as a character string in which an arbitrary number of characters are arranged for convenience. Actually, it may be data in which one character corresponds to one byte as in an ASCII character string, or a byte string resulting from character encoding of a character string may be input to a hash function as original data.

また、パスワードは、暗証番号のみならず、PIN、パスフレーズなどを含んでも良い。   The password may include not only a personal identification number but also a PIN, a passphrase, and the like.

<全般的な説明>
図1〜5を用いて、パスワード認証方法の概略と、それに対する攻撃法の例を説明する。
<General description>
An outline of a password authentication method and an example of an attack method for the password authentication method will be described with reference to FIGS.

図1は、パスワード認証の概略を説明する図である。以下では、文字列を暗号化するために、その文字列に暗号化関数としてハッシュ関数を作用させ、暗号化値としてハッシュ値(または単にハッシュ)を得る方法を用いる。しかしながら、暗号化関数としては、MD2、MD4、MD5、SHA等のハッシュ関数に限らず、他の暗号化関数を用いても良い。暗号化関数としては、フィードバックシフトレジスタ(LFSR)によるシフト、ビットのシフト後、2個の要素を有する拡大ガロア体上GF(2)上の特性多項式の剰余などの一方向関数を含み得る。 FIG. 1 is a diagram for explaining the outline of password authentication. In the following, in order to encrypt a character string, a method is used in which a hash function is applied to the character string as an encryption function, and a hash value (or simply hash) is obtained as an encryption value. However, the encryption function is not limited to the hash function such as MD2, MD4, MD5, and SHA, and other encryption functions may be used. The encryption function may include a one-way function such as a shift of a feedback shift register (LFSR), a bit of a shift, a remainder of a characteristic polynomial over a GF (2 m ) over an extended Galois field having 2 m elements. .

事前処理として、正しいパスワードにハッシュ関数H’を作用させて、正しいハッシュを生成させておく。図1の例では、正しいパスワード「p@ssW0rd」にハッシュ関数H’を作用させ、正しいハッシュ「c6e71570a97」を生成する。   As pre-processing, a correct hash is generated by applying a hash function H ′ to a correct password. In the example of FIG. 1, the hash function H ′ is applied to the correct password “p @ ssW0rd” to generate a correct hash “c6e71570a97”.

認証時には、ユーザによって入力されたパスワードにハッシュ関数H’を作用させてハッシュ(比較ハッシュ)を生成し、それを事前に得られている正しいハッシュと比較する。そして、ユーザによって入力されたパスワードから生成されたハッシュである比較ハッシュと正しいハッシュと一致すれば、その文字列を入力したユーザを正規ユーザとして認証する。   At the time of authentication, the hash function H ′ is applied to the password input by the user to generate a hash (comparison hash) and compare it with the correct hash obtained in advance. If the comparison hash, which is a hash generated from the password input by the user, matches the correct hash, the user who inputs the character string is authenticated as a regular user.

図1の例では、ユーザによって文字列「password」が入力されるとする。その文字列にハッシュ関数H’を作用させると、ハッシュ「56529076e997」が得られる。これと正しいハッシュ「c6e71570a97」を比較すると一致しないので、このユーザは正規ユーザとして認証されない。   In the example of FIG. 1, it is assumed that a character string “password” is input by the user. When the hash function H ′ is applied to the character string, the hash “56529076e997” is obtained. When this is compared with the correct hash “c6e71570a97”, it does not match, so this user is not authenticated as a regular user.

一方、あるユーザがパスワードとして文字列「p@ssW0rd」を入力したとすると、この文字列にハッシュ関数H’を作用させると、ハッシュ「c6e71570a97」が得られる。これは正しいハッシュと一致する。よって、このユーザは正規ユーザとして認証される。   On the other hand, if a user inputs a character string “p @ ssW0rd” as a password, a hash “c6e71570a97” is obtained by applying a hash function H ′ to this character string. This matches the correct hash. Therefore, this user is authenticated as a regular user.

一般に、ハッシュ関数では元のデータが少しでも異なると、ハッシュ関数を作用して得られるハッシュ値はまったく異なる値になるため、元データが類似していることを知ることができない。つまり、二つの元データである文字列が類似している、たとえば1文字違いであることをそれらのハッシュ値のみから知ることはできない。   In general, if the original data in the hash function is slightly different, the hash values obtained by operating the hash function are completely different, so it is impossible to know that the original data is similar. That is, it cannot be known from only the hash values that the two original data character strings are similar, for example, one character difference.

図2Aは、正規ユーザからのオンライン総当り攻撃を受けたときの状況の例を示す図である。図2Bは、攻撃者からのオンライン総当り攻撃を受けたときの状況の例を示す図である。   FIG. 2A is a diagram illustrating an example of a situation when receiving an online brute force attack from a regular user. FIG. 2B is a diagram illustrating an example of a situation when receiving an online brute force attack from an attacker.

正規ユーザからの入力であっても、ケアレスミスや、ふとパスワードが思い出せなくなってしまったなどの理由で、パスワードを連続して何回か間違ってしまう状況がある。これは、パスワードがあらゆる場面で使われ、子供や老人など老若男女を問わずパスワードを使用するIT社会では頻出する可能性がある。このような状況では、正しいパスワードと何らかの関連性がある文字列が入力されることが多い。しかも、正規ユーザがパスワードを連続して何回か間違えるとアカウントロックが起こり、再度可能にするには、しばらく待つ、管理者に解除してもらう、など時間的なロスが発生するだけでなく、データが消去される可能性もある。   Even if it is input from a legitimate user, there are situations where the password is mistaken several times in succession due to careless mistakes or suddenly being unable to remember the password. This is likely to occur frequently in the IT society where passwords are used everywhere, and regardless of age or sex, such as children or the elderly. In such a situation, a character string having some relationship with a correct password is often input. Moreover, if an authorized user mistakes the password several times in succession, an account lock occurs, and in order to make it possible again, not only will there be a time loss, such as waiting for a while or having the administrator release it, Data may be erased.

図2Aに示されている例では、正しいパスワードが文字列「p@ssW0rd」であるにも関わらず、正規ユーザが文字列「password」、「passWord」など、正しい文字列に「類似」の文字列が入力される。   In the example shown in FIG. 2A, even though the correct password is the character string “p @ ssW0rd”, the legitimate user is the character “similar” to the correct character string, such as the character string “password” or “passWord”. A column is entered.

また、認証システムには、正規でないユーザから、システムに格納されている個人データ等の秘匿データを盗むために、攻撃が仕掛けられることがある。   In addition, an attack may be set on the authentication system in order to steal confidential data such as personal data stored in the system from an unauthorized user.

図2Bは、攻撃者が考え得る文字列全てを入力することによってセキュリティを破ろうとする攻撃を仕掛けたとき、パスワードとして入力される文字列の例である。この場合、攻撃者は正しいパスワードに関する情報を事前には全く持ち合わせていないので、正しいパスワードとは何ら関連性のない文字列を入力することが多い。図2Bの例では、正しいパスワードが文字列「p@ssW0rd」であるにも関わらず、文字列「xA51aaaa」など、正しいパスワードとハミング距離が長いだけでなく、正しい文字列とは「類似性が薄い」または正しい文字列の「近傍」にはない文字列が入力される。   FIG. 2B is an example of a character string that is input as a password when an attack that attempts to break security by entering all character strings that an attacker can conceive. In this case, since the attacker does not have information on the correct password in advance, the character string often has nothing to do with the correct password. In the example of FIG. 2B, although the correct password is the character string “p @ ssW0rd”, the correct password and the correct character string such as the character string “xA51aaa” are not only long, but “similarity A character string that is not “near” or “near” the correct character string is input.

もし、図2Aと図2Bに示されているような2つの状況を互いに見分けることができれば、総当たり攻撃の検出精度が高まる、アカウントロックの精度が高まり、正しいユーザのミスでロックしてしまう可能性が減るなどのメリットが期待できる。   If the two situations shown in FIG. 2A and FIG. 2B can be distinguished from each other, the accuracy of brute force detection will increase, the accuracy of account lock will increase, and it will be possible to lock with the correct user error Benefits such as a decrease in sex can be expected.

しかし、こうした類似マッチができると、ハッシュ値のみから元データの類似性を知ることができるので、類似性がわからないときよりも安全性が低下している可能性がある。すなわち、ハッシュ値の元データを知りたい攻撃者は、予想した元データが正しい元データと完全に一致しなくても類似していれば類似していることがわかるので、次回以降の予想範囲をかなり狭めることができる。このため、類似マッチができないときよりも少ない試行回数で正しい元データを知ることができる可能性がある。こうした類似マッチでは、目的とする類似性がわかってしまうのは仕方がないが、それ以上の性質はわからないようにすることが望ましい。また、鍵付きハッシュの技術を用い、ハッシュ関数の処理に秘密情報を導入することで、秘密情報を知らない第三者には類似マッチすらできないようにすることで、安全性低下の脅威を軽減できる場合もある。   However, if such a similarity match is possible, the similarity of the original data can be known only from the hash value, so there is a possibility that the safety is lower than when the similarity is unknown. In other words, an attacker who wants to know the original data of the hash value knows that the predicted original data is similar if it is similar even if it does not completely match the correct original data. It can be considerably narrowed. For this reason, there is a possibility that correct original data can be known with a smaller number of trials than when a similar match is not possible. In such similar matches, it is unavoidable to find out the desired similarity, but it is desirable not to know any further properties. In addition, by introducing secret information into the hash function processing using keyed hashing technology, it is possible to prevent even a similar match from being performed by a third party who does not know the secret information, thereby reducing the threat of reduced security. Sometimes you can.

正規ユーザによるパスワード入力ミスと攻撃者によるパスワード入力ミスを見分ける方法の一つとして、図3に示されているような平文比較方式がある。   One of the methods for discriminating a password input mistake by a regular user from a password input mistake by an attacker is a plain text comparison method as shown in FIG.

この方法では、入力されたパスワードと正しいパスワードの平文を比較する。しかし、平文のパスワードを保存するのは危険であるという問題がある。特に、正しいパスワードの平文が漏洩したり、管理者などの覗き見される可能性がある。正しパスワードを暗号化しておいても、暗号化の鍵が漏れたり、鍵が推測されるとパスワードが露見してしまう可能性がある。   In this method, the input password is compared with the plain text of the correct password. However, there is a problem that storing plaintext passwords is dangerous. In particular, there is a possibility that the plain text of the correct password will be leaked or the administrator will peep. Even if the password is correctly encrypted, the password may be revealed if the encryption key leaks or the key is guessed.

正規ユーザによるパスワード入力ミスと攻撃者によるパスワード入力ミスを見分ける方法の別の例として、一方の元データに類似したデータすべてに対するハッシュ値(類似ハッシュ値)を作成するという方法が考えられる。それらのハッシュ値のいずれかがもう一方の元データから得たハッシュ値と一致すれば類似していることを知ることができる。たとえば、元データを「abcd」とすると、1文字目を置き換えた「bbcd」「cbcd」「dbcd」など、2文字目を置き換えた「aacd」「accd」「adcd」のように1文字違いの類似データをすべて作成し、それらのハッシュ値を作成することで、別の元データのハッシュ値がいずれかの類似ハッシュ値が一致すれば1文字違いであることがわかる。   As another example of a method for discriminating a password input mistake by a legitimate user and a password input mistake by an attacker, a method of creating a hash value (similar hash value) for all data similar to one original data can be considered. If any of these hash values matches the hash value obtained from the other original data, it can be known that they are similar. For example, if the original data is “abcd”, one character difference such as “abcd”, “accd”, “adcd” in which the second character is replaced, such as “bbcd”, “cbcd”, “dbcd” in which the first character is replaced, etc. By creating all the similar data and creating their hash values, it can be seen that if one of the similar hash values matches the hash value of another original data, it is different by one character.

図4は、オンライン総当り攻撃に対する対策の一つとして、近傍文字列すべてのハッシュ値を取っておく方法の例を示す図、図5はオンライン総当り攻撃に対する対策の一つとして、近傍文字列すべてのハッシュ値を取っておく方法の別の例を示す図である。   FIG. 4 is a diagram showing an example of a method for storing hash values of all neighboring character strings as one of countermeasures against online brute force attacks, and FIG. 5 is a neighboring character string as one of countermeasures against online brute force attacks. It is a figure which shows another example of the method of keeping all the hash values.

図4では、事前に正しいパスワードである文字列「p@ssW0rd」と1文字だけ異なる文字列を全て生成する。たとえば、1文字目を削除して「@ssW0rd」としたり、1文字目を置換して「a@ssW0rd」としたりする。そして、これらの正しいパスワードと1文字だけ異なる文字列のそれぞれにハッシュ関数H’を作用させ、ハッシュ値を得ておく。これらのハッシュは近傍ハッシュ群を形成する。正しいパスワードである文字列「p@ssW0rd」に対応するハッシュである主ハッシュも事前に得ておく。   In FIG. 4, all character strings different from the character string “p @ ssW0rd”, which is a correct password, by one character are generated in advance. For example, the first character is deleted to “@ ssW0rd”, or the first character is replaced to “a @ ssW0rd”. Then, the hash function H ′ is applied to each of the character strings different from the correct password by one character to obtain a hash value. These hashes form a neighborhood hash group. A main hash which is a hash corresponding to the character string “p @ ssW0rd” which is a correct password is also obtained in advance.

ここで、近傍ハッシュ群とは、正しいパスワードを示す文字列の「近傍」にある文字列から生成されるハッシュ値の集まりであり得る。   Here, the neighborhood hash group may be a collection of hash values generated from a character string in the “neighborhood” of a character string indicating a correct password.

認証時には、入力されたパスワード、たとえば「p@ssW0rd」にハッシュ関数H’を作用させ、比較ハッシュを得る。図4の場合、比較ハッシュとして文字列「c6e715703a97」が得られる。この比較ハッシュは、主ハッシュと一致する。   At the time of authentication, a hash function H ′ is applied to the input password, for example, “p @ ssW0rd” to obtain a comparison hash. In the case of FIG. 4, the character string “c6e715703a97” is obtained as the comparison hash. This comparison hash matches the main hash.

この方法では、パスワードをn文字とすると、近傍ハッシュ群の要素は約 n×96個必要(96は文字の種類数)となり、n=8 なら768個、2文字違いや文字挿入も考えると、近傍ハッシュ群の要素はもっと多くなる。   In this method, if the password is n characters, there are about n × 96 elements in the neighborhood hash group (96 is the number of characters), and if n = 8, 768, 2 character differences and character insertion are considered. There are more elements in the neighborhood hash group.

図5では、事前に正しいパスワードである文字列「p@ssW0rd」に対応するハッシュは正しい主ハッシュだけ得ておく。   In FIG. 5, only the correct main hash is obtained in advance as the hash corresponding to the character string “p @ ssW0rd” which is a correct password.

認証時には、まず、入力された文字列にハッシュ関数H’を作用させ、主ハッシュを得る。また、入力された文字列と1文字だけ異なる文字列を全て生成し、これらの文字列全てから対応するハッシュを得る。これらのハッシュは近傍ハッシュ群を形成する。事前に得られている正しい主ハッシュと、認証時に入力された文字列に関連する主ハッシュおよび近傍ハッシュ群の要素を比較する。   At the time of authentication, first, a hash function H ′ is applied to the input character string to obtain a main hash. Also, all character strings that differ from the input character string by one character are generated, and corresponding hashes are obtained from all these character strings. These hashes form a neighborhood hash group. The correct primary hash obtained in advance is compared with the elements of the primary hash and the neighborhood hash group related to the character string input at the time of authentication.

図5の場合、認証時に入力された文字列「passW0rd」に対応するハッシュは正しい主ハッシュとは異なるが、近傍ハッシュ群の要素の一つが正しい主ハッシュと一致する。この場合、入力された文字列は、正規ユーザが誤って入力した文字列である可能性が高いと判定される。   In the case of FIG. 5, the hash corresponding to the character string “passW0rd” input at the time of authentication is different from the correct main hash, but one of the elements in the neighborhood hash group matches the correct main hash. In this case, it is determined that there is a high possibility that the input character string is a character string erroneously input by the authorized user.

しかし、この方法では、必要となる類似ハッシュ値の数が多すぎ、ハッシュ値生成の処理量または生成したハッシュ値を格納する容量が膨大になってしまう。具体的には、文字の種類がm、元データを構成する文字の数が最大nだったとすると、1文字違いの類似を表現するだけでもおよそm×n個のハッシュ値が必要になる。たとえば、ASCIIコードでは制御文字を除く文字はおよそ100種類あり、それら文字から構成される元データが最大16文字だとすると、およそ1600個の類似ハッシュ値が必要となる。   However, in this method, the number of necessary similar hash values is too large, and the processing amount for generating the hash values or the capacity for storing the generated hash values becomes enormous. Specifically, if the type of character is m and the maximum number of characters constituting the original data is n, approximately m × n hash values are required only to express the similarity of one character difference. For example, in the ASCII code, there are approximately 100 types of characters excluding control characters, and if the original data composed of these characters is a maximum of 16 characters, approximately 1600 similar hash values are required.

図6は、開示の実施形態にしたがう近傍ハッシュの生成方法の例の概略を示す図である。   FIG. 6 is a diagram illustrating an outline of an example of a neighborhood hash generation method according to the disclosed embodiment.

本方法では、たとえば、比較対象の文字列aと文字列bがあるとする。このとき、まず文字列aの各位置の文字をワイルドカード文字に置き換えてからハッシュ値を計算する。ワイルドカード文字とは、本方式において任意の文字に合致することを表現するための特別な文字で、任意の文字の代替として使用される文字である。ワイルドカード文字は、元データに使われ得る文字でなければ何でもよく、あらかじめ一つを決めておく。こうして計算されたハッシュ値をまとめて、文字列aの類似ハッシュ値集合Aとする。文字列bに対しても同様に類似ハッシュ値集合Bを計算する。類似比較をするには、Aの要素のいずれかとBの要素のいずれかが一致するかどうかを比較する。一致するものがあれば、文字列aとbは1文字違いであることがわかる。   In this method, for example, it is assumed that there are a character string a and a character string b to be compared. At this time, the hash value is calculated after first replacing the character at each position in the character string a with a wildcard character. A wild card character is a special character for expressing that it matches an arbitrary character in this method, and is a character used as a substitute for an arbitrary character. The wild card character may be anything as long as it is not a character that can be used for the original data, and one is determined in advance. The hash values calculated in this way are collected into a similar hash value set A of the character string a. Similarly, a similar hash value set B is calculated for the character string b. In order to perform the similarity comparison, it is compared whether any of the elements of A matches any of the elements of B. If there is a match, it can be seen that the character strings a and b are different by one character.

図6の例では、事前に正しいパスワードである文字列「p@ssW0rd」の各位置をワイルドカード「_」に置換した文字列を生成する。そして、これらの文字列にハッシュ関数h”を作用させておく。   In the example of FIG. 6, a character string is generated by replacing each position of the character string “p @ ssW0rd”, which is a correct password, with a wild card “_” in advance. A hash function h ″ is applied to these character strings.

認証時も、入力された文字列「passW0rd」の各位置をワイルドカード「_」に置換した文字列を生成する。そして、これらの文字列にハッシュ関数h”を作用させる。そして、事前に得られているハッシュと、認証時に得たハッシュ値のどれかが一致するなら、入力されたパスワードは1文字違いである。   Also during authentication, a character string is generated by replacing each position of the input character string “passW0rd” with a wild card “_”. Then, the hash function h ″ is applied to these character strings. If the hash obtained in advance matches one of the hash values obtained at the time of authentication, the input password is different by one character. .

これらの処理は、認証時に入力された文字列に対応するハッシュが、正しいパスワードに対応するハッシュとは異なることを判定した後に処理されても良いし、同時に処理されても良い。   These processes may be performed after determining that the hash corresponding to the character string input at the time of authentication is different from the hash corresponding to the correct password, or may be processed simultaneously.

この方法では、パスワードをn文字とすると、事前に保存するハッシュの数はn個、認証時に生成するハッシュの数もn個、そしてn回の比較よって、正規ユーザによるパスワード入力ミスと攻撃者によるパスワード入力ミスを見分けることができる。実際には文字列は最大16文字などと決めて、足りない分はパディングしても良い。 In this way, if the password and n characters, the number of n hash to be saved in advance, the number is also n-number of hash to generate at the time of authentication, and n comparison of twice Thus, the password input error by a regular user attacker Can be used to identify password entry mistakes. Actually, the character string may be determined as a maximum of 16 characters, and the missing part may be padded.

また、前記の方法で類似ハッシュ値集合を作ると、集合の大きさ(すなわち集合に含まれるハッシュの数)から元の文字列の長さ(すなわち文字数)がわかってしまう。これを防ぐには、元の文字列にパディングを施してから各文字の置換を行う。パディングの処理は、ワイルドカード文字と同様にパディングを表すための特別なパディング文字を用意して、既定の文字数に達するまで元の文字列の後ろに付け足す。もしも元の文字列が既定の文字数よりも長ければ、既定数を超える文字は取り除いて短くしても良いし、あるいは文字列はそのままでワイルドカード文字へ置換する文字位置を規定文字数までで止めても良い。   Further, when a similar hash value set is created by the above method, the length (that is, the number of characters) of the original character string is known from the size of the set (ie, the number of hashes included in the set). To prevent this, each character is replaced after padding the original character string. The padding process prepares a special padding character for representing padding in the same manner as the wildcard character, and adds it to the end of the original character string until the predetermined number of characters is reached. If the original character string is longer than the default number of characters, characters exceeding the default number can be removed and shortened, or the character string can be left as it is and replaced with wildcard characters up to the specified number of characters. Also good.

図7は、近傍ハッシュの生成方法の例を示す図である。
ワイルドカード文字を元の文字と置き換えるだけでなく、元の文字の前または後に挿入してもよい。これにより、1文字多いまたは少ないという類似も検出できる。前記のパディングで長さを揃えている場合は、挿入した分末尾の文字を取り除く。また、そうすると、パディング文字を置換した場合とパディング文字の前に挿入した場合とで同じ文字列が作られてしまい、類似ハッシュ値同士が一致する組数からパディング文字が何文字あるか、すなわち元の文字列が何文字かがわかってしまうため、これを避けるために、挿入位置がパディング文字の直前である場合は敢えて文字列が一致しないように変更を加える。文字列の最初にパディング文字を加えても良い。
FIG. 7 is a diagram illustrating an example of a neighborhood hash generation method.
In addition to replacing the wildcard character with the original character, it may be inserted before or after the original character. Thereby, the similarity that one character is more or less can be detected. If the length is equalized by the padding, the last character is removed for the inserted length. In this case, the same character string is created when the padding character is replaced and when it is inserted before the padding character, and the number of padding characters from the number of pairs in which similar hash values match, that is, the original In order to avoid this, if the insertion position is immediately before the padding character, a change is made so that the character strings do not match. You may add padding characters at the beginning of the string.

また、ワイルドカード文字を複数の位置で置き換えまたは挿入することもできる。これにより、1文字だけでなく複数文字の違いや増加・減少も類似と見なして検出することができる。   Wildcard characters can also be replaced or inserted at multiple positions. Thereby, not only one character but also a difference or increase / decrease in a plurality of characters can be regarded as similar and detected.

図7の例では、元の8文字の文字列「abcdefgh」の後ろにパディング文字「.」を挿入し16文字の文字列「abcdefgh........」を生成する。そして、この16文字の文字列「abcdefgh........」の各位置をワイルドカード文字「_」に置換した後にハッシュ関数を作用させる(ハッシュする)。たとえば、16文字の文字列「abcdefgh........」の第1文字目をワイルドカードに置換すると、「_bcdefgh........」が得られ、これにハッシュ関数を作用させハッシュ値「c6e095202b97」を得る。   In the example of FIG. 7, padding characters “.” Are inserted after the original 8-character string “abcdefgh” to generate a 16-character string “abcdefgh... Then, after replacing each position of the 16-character string “abcdefgh...” With the wild card character “_”, a hash function is applied (hashed). For example, if the first character of a 16-character string “abcdefgh...” Is replaced with a wild card, “_bcdefgh. The hash value “c6e095202b97” is obtained by acting.

パディング文字は「.」、ワイルドカード文字は「_」としたが、パスワードに使われない文字なら何でも良く、また何バイトでも良い。制御文字であっても良い。   Although the padding character is “.” And the wildcard character is “_”, any character that is not used in the password may be used, and any number of bytes may be used. It may be a control character.

<装置の構成>
図8〜11を参照して、上記のような機能を有する暗号処理装置の例を説明する。
<Device configuration>
With reference to FIGS. 8 to 11, an example of a cryptographic processing apparatus having the above functions will be described.

暗号処理装置10は電子計算機上のソフトウェアとして実現されるものとするが、ハードウェアとして実現されても構わない。   The cryptographic processing device 10 is realized as software on an electronic computer, but may be realized as hardware.

図8は、類似比較を行う暗号処理装置10の構成の例を示す図である。暗号処理装置10は、第1の類似ハッシュ生成部102、第2の類似ハッシュ生成部104、および類似ハッシュ比較部106を含む。類似ハッシュ比較部106は、第1の類似ハッシュ生成部102および第2の類似ハッシュ生成部104と電気的に接続される。第1の類似ハッシュ生成部102と第2の類似ハッシュ生成部104はそれぞれ、入力文字列Aおよび入力文字列Bから主ハッシュ値H(A)、H(B)および類似ハッシュデータ(近傍ハッシュ群)NA、NBを生成する。類似ハッシュ比較部106は、複数の入力文字列から作られた主ハッシュ値と類似ハッシュデータの組を使い、両者の一致結果および類似度を出力する。図8では、類似ハッシュ比較部106は、第1の類似ハッシュ生成部102の出力である主ハッシュ値H(A)と類似ハッシュデータNA、第2の類似ハッシュ生成部104の出力である主ハッシュ値H(B)と類似ハッシュデータNBを比較する。   FIG. 8 is a diagram illustrating an example of the configuration of the cryptographic processing apparatus 10 that performs similarity comparison. The cryptographic processing apparatus 10 includes a first similar hash generation unit 102, a second similar hash generation unit 104, and a similar hash comparison unit 106. The similar hash comparison unit 106 is electrically connected to the first similar hash generation unit 102 and the second similar hash generation unit 104. The first similar hash generation unit 102 and the second similar hash generation unit 104 respectively obtain the main hash values H (A), H (B) and similar hash data (neighboring hash group) from the input character string A and the input character string B. ) Generate NA and NB. The similar hash comparison unit 106 uses a combination of a main hash value and similar hash data created from a plurality of input character strings, and outputs a matching result and a similarity between the two. In FIG. 8, the similar hash comparison unit 106 includes the main hash value H (A) that is the output of the first similar hash generation unit 102 and the similar hash data NA, and the main hash that is the output of the second similar hash generation unit 104. The value H (B) is compared with the similar hash data NB.

第1の類似ハッシュ生成部102、第2の類似ハッシュ生成部104、および類似ハッシュ比較部106は互いに、物理的にまったく別々に配置されても良いし、ごく近くに配置されても良い。また、これらが一つの筐体内に収められていても良いし、互いに別個の筐体に収められても良い。互いに別個の筐体に収められている場合、ある場所で作られた類似ハッシュデータを通信によって移動させて、別の場所で比較に用いる。また第1の類似ハッシュ生成部102と第2の類似ハッシュ生成部104のいずれかが、類似ハッシュ比較部106と同じ筐体に収められていても良い。ここで、同じ筐体に収められていなくても、近い位置にあれば良いものとする。たとえば、同じ建物であったり、同じ組織内であってりしていても良い。また、物理的な配置だけでなく時間的な配置についても同様で、生成された類似ハッシュデータをすぐに比較に使っても構わないし、保存しておいて後で比較しても構わない。図の二つの類似ハッシュデータの一方は保存しておいて、もう一方は比較時に生成しても構わない。   The first similar hash generation unit 102, the second similar hash generation unit 104, and the similar hash comparison unit 106 may be arranged physically separate from each other or may be arranged very close to each other. Moreover, these may be stored in one housing | casing and may be stored in a mutually separate housing | casing. When they are housed in separate housings, similar hash data created at one location is moved by communication and used for comparison at another location. In addition, either the first similar hash generation unit 102 or the second similar hash generation unit 104 may be housed in the same housing as the similar hash comparison unit 106. Here, even if they are not housed in the same casing, it is sufficient if they are close to each other. For example, they may be in the same building or in the same organization. The same applies to not only the physical arrangement but also the temporal arrangement. The generated similar hash data may be used immediately for comparison, or may be stored and compared later. One of the two similar hash data in the figure may be stored and the other may be generated at the time of comparison.

図9は、図8の類似ハッシュ生成部102、104の機能ブロックの例を示す図である。類似ハッシュ生成部102と104は同一または類似の構成を有し、以下では、類似ハッシュ生成部102を例に説明をする。類似ハッシュ生成部102は、入力文字受付部1020、第1ハッシュ関数作用部1022、類似文字列群生成部1024、および第2ハッシュ関数作用部1026を含む。また、類似ハッシュ生成部104は、入力文字受付部1040、第1ハッシュ関数作用部1042、類似文字列群生成部1044、および第2ハッシュ関数作用部1046を含み、これらはそれぞれ、入力文字受付部1020、第1ハッシュ関数作用部1022、類似文字列群生成部1024、および第2ハッシュ関数作用部1026と同一または類似の構成および/または機能を有する。   FIG. 9 is a diagram illustrating an example of functional blocks of the similar hash generation units 102 and 104 in FIG. The similar hash generation units 102 and 104 have the same or similar configuration, and the similar hash generation unit 102 will be described below as an example. The similar hash generation unit 102 includes an input character reception unit 1020, a first hash function operation unit 1022, a similar character string group generation unit 1024, and a second hash function operation unit 1026. The similar hash generation unit 104 includes an input character reception unit 1040, a first hash function operation unit 1042, a similar character string group generation unit 1044, and a second hash function operation unit 1046, which are respectively input character reception units. 1020, the first hash function operation unit 1022, the similar character string group generation unit 1024, and the second hash function operation unit 1026 have the same or similar configuration and / or function.

類似ハッシュ生成部102は、入力文字列を受け取り、主ハッシュ値と類似ハッシュ値群を出力する。   The similar hash generation unit 102 receives an input character string and outputs a main hash value and a similar hash value group.

入力文字受付部1020は、入力された文字列を入力文字列として受け取り、受け取った入力文字列を第1ハッシュ関数作用部1022および類似文字列群生成部1024に出力する。   The input character reception unit 1020 receives the input character string as an input character string, and outputs the received input character string to the first hash function operation unit 1022 and the similar character string group generation unit 1024.

第1ハッシュ関数作用部1022では、入力文字受付部1020から受けた入力文字列にハッシュ関数を作用させ、得られたハッシュ値を主ハッシュ値として出力する。   The first hash function operating unit 1022 applies a hash function to the input character string received from the input character receiving unit 1020, and outputs the obtained hash value as the main hash value.

類似文字列群生成部1024は、図7に示したように、入力文字列を改変して複数の類似文字列を生成する。上述のように、類似文字列にワイルドカード文字が使用される。類似文字列群生成部1024で生成された類似文字列は、第2ハッシュ関数作用部1026に出力される。   As illustrated in FIG. 7, the similar character string group generation unit 1024 generates a plurality of similar character strings by modifying the input character string. As described above, wildcard characters are used for similar character strings. The similar character string generated by the similar character string group generation unit 1024 is output to the second hash function operation unit 1026.

第2ハッシュ関数作用部1026では、類似文字列群生成部1024から受けた類似文字列にハッシュ関数を作用させ、得られたハッシュ値を類似ハッシュデータとして出力する。   The second hash function operating unit 1026 operates the hash function on the similar character string received from the similar character string group generation unit 1024, and outputs the obtained hash value as similar hash data.

第1ハッシュ関数作用部1022と第2ハッシュ関数作用部1026で用いられるハッシュ関数は、暗号学的ハッシュ関数であれば良い。また、第1ハッシュ関数作用部1022と第2ハッシュ関数作用部1026は、同じアルゴリズムでなくても構わない。さらに、第1ハッシュ関数作用部1022と第2ハッシュ関数作用部1026は、一般にソルトと呼ばれる攪拌情報を加えるアルゴリズムを用いても良いし、鍵情報を用いるHMAC(ハッシュによるメッセージ認証コード)アルゴリズムであっても構わない。第1ハッシュ関数作用部1022と第2ハッシュ関数作用部1026は、まったく同じ構成および/または機能であるよりも、アルゴリズムそのものや付随するソルトまたは鍵情報の値が異なるほうが安全性は高く、望ましい。   The hash function used in the first hash function operating unit 1022 and the second hash function operating unit 1026 may be a cryptographic hash function. Further, the first hash function operation unit 1022 and the second hash function operation unit 1026 may not be the same algorithm. Further, the first hash function operation unit 1022 and the second hash function operation unit 1026 may use an algorithm that adds agitation information generally called salt, or an HMAC (message authentication code by hash) algorithm that uses key information. It doesn't matter. The first hash function operating unit 1022 and the second hash function operating unit 1026 are more secure and desirable if the algorithm itself and the value of the accompanying salt or key information are different than the same configuration and / or function.

図10は類似ハッシュ比較部106の構成の例を示す図である。類似ハッシュ比較部106は、二つの入力文字列A、Bに対するそれぞれの主ハッシュ値H(A)、H(B)と類似ハッシュデータの組NA、NBを入力として受け付け、一致または不一致を表す一致結果と、類似度を出力する。   FIG. 10 is a diagram illustrating an example of the configuration of the similar hash comparison unit 106. The similar hash comparison unit 106 receives as input the main hash values H (A) and H (B) and similar hash data sets NA and NB for the two input character strings A and B, and indicates a match or a match. Output the result and similarity.

類似ハッシュ比較部106は、主ハッシュ値比較部1060および類似ハッシュデータ比較部1062を含む。   The similar hash comparison unit 106 includes a main hash value comparison unit 1060 and a similar hash data comparison unit 1062.

主ハッシュ値比較部1060は、主ハッシュ値H(A)とH(B)を比較し、同じ値であれば一致、さもなければ不一致と判断する。   The main hash value comparison unit 1060 compares the main hash values H (A) and H (B), and determines that they are the same if they are the same value, and that they do not match.

類似ハッシュデータ比較部1062は、類似ハッシュデータを比較して類似度を出力する。   The similar hash data comparison unit 1062 compares the similar hash data and outputs the similarity.

図11は類似ハッシュデータの構成の例である。類似ハッシュデータは、類似度と類似ハッシュ値の組を一つ以上含む。類似度は、類似ハッシュ値が元の文字列から何文字分変化した文字列に対応するかを示している。類似ハッシュ値は、第1ハッシュ関数作用部1022と第2ハッシュ関数作用部1026の出力であり、長さや形式は用いられるハッシュ関数に依存する。図11では、用いられるアルゴリズムとしてSHA−1を想定し、80ビット(20バイト)のハッシュ値を40桁の16進数として表現している。   FIG. 11 shows an example of the structure of similar hash data. The similar hash data includes one or more sets of similarity and similar hash values. The similarity indicates how many characters the similarity hash value corresponds to from the original character string. The similar hash value is an output of the first hash function operation unit 1022 and the second hash function operation unit 1026, and the length and format depend on the hash function used. In FIG. 11, SHA-1 is assumed as an algorithm used, and an 80-bit (20-byte) hash value is expressed as a 40-digit hexadecimal number.

このように、暗号処理装置10は、第1の入力文字列に任意の文字として使用される第1のワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記第1のワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成する第1の類似文字列生成部1022と、類似文字列に暗号化関数を作用させて第1の比較暗号値を生成する第1の暗号化部1026と、第2の入力文字列に任意の文字として使用される第2のワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記第2のワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成する第2の類似文字列生成部1042と、第2の類似文字列に暗号化関数を作用させて第2の比較暗号値を生成する第2の暗号化部1046と、第1の比較暗号値と第2の比較暗号値を比較して、第1の入力文字列と第2の入力文字列の類似度を判定する類似暗号比較部106を含んでいる。 As described above, the cryptographic processing apparatus 10 can obtain at least one of the character string obtained by inserting the first wildcard character used as an arbitrary character into the first input character string, or the first input character string. A first similar character string group generation unit 1022 that generates a character string obtained by replacing one character with the first wildcard character as a first similar character string, and an encryption function is applied to the similar character string A first encryption unit 1026 for generating a first comparison cipher value, and a character string obtained by inserting a second wildcard character used as an arbitrary character in the second input character string, Or a second similar character string group generation unit 1042 that generates, as a second similar character string, a character string obtained by replacing at least one character of the second input character string with the second wildcard character; , Second similar sentence A second encryption unit 1046 for generating a second comparison cipher value by applying an encryption function to the column, and comparing the first comparison cipher value and the second comparison cipher value to obtain a first input character A similar encryption comparison unit 106 that determines the similarity between the sequence and the second input character string is included.

この場合、ある文字列の「類似度」とは、パディング文字に挿入または置換された文字数であっても良い。そして、ある文字列が、別の文字列について、パディング文字に挿入または置換された文字数が所定の文字数以下であるとき、互いに「近傍」にあると定義しても良い。   In this case, the “similarity” of a certain character string may be the number of characters inserted or replaced with padding characters. Then, a certain character string may be defined as being “near each other” when the number of characters inserted or replaced with padding characters is less than or equal to a predetermined number of characters with respect to another character string.

上記では、暗号化関数としてハッシュ関数を用いたが、別の暗号化関数を用いても良い。ハッシュ関数作用部は単に暗号化部、類似ハッシュ比較部は単に類似暗号比較部と呼ぶこともある。   In the above, the hash function is used as the encryption function, but another encryption function may be used. The hash function operation unit may be simply referred to as an encryption unit, and the similar hash comparison unit may be simply referred to as a similar encryption comparison unit.

上記では、2つの文字列にともにワイルドカードを挿入または文字列の少なくとも1文字をワイルドカードに置換して得られる文字列群を暗号化して得られる2つの暗号化値群を比較した。しかしながら、2つの文字列のうち一方のみから暗号化値群を生成し、もう一方の文字列の暗号化値と比較しても良い。   In the above description, two encrypted value groups obtained by encrypting a character string group obtained by inserting a wild card into two character strings or substituting at least one character of the character string with a wild card are compared. However, an encrypted value group may be generated from only one of the two character strings and compared with the encrypted value of the other character string.

図12は、暗号処理装置10または、第1の類似ハッシュ生成部102、第2の類似ハッシュ生成部104、および/もしくは類似ハッシュ比較部106の構成の例を示す構成図である。図12は、暗号処理装置10または、第1の類似ハッシュ生成部102、第2の類似ハッシュ生成部104、および/もしくは類似ハッシュ比較部106として使用可能なコンピュータの一例の構成図である。   FIG. 12 is a configuration diagram illustrating an example of the configuration of the cryptographic processing device 10 or the first similar hash generation unit 102, the second similar hash generation unit 104, and / or the similar hash comparison unit 106. FIG. 12 is a configuration diagram of an example of a computer that can be used as the cryptographic processing apparatus 10 or the first similar hash generation unit 102, the second similar hash generation unit 104, and / or the similar hash comparison unit 106.

このコンピュータ500は、MPU502、ROM504、RAM506、ハードディスク装置508、入力装置510、表示装置512、インタフェース装置514、及び記録媒体駆動装置516を備えている。なお、これらの構成要素はバスライン520を介して接続されており、MPU502の管理の下で各種のデータを相互に授受することができる。   The computer 500 includes an MPU 502, ROM 504, RAM 506, hard disk device 508, input device 510, display device 512, interface device 514, and recording medium drive device 516. These components are connected via a bus line 520, and various data can be exchanged under the management of the MPU 502.

MPU(Micro Processing Unit)502は、このコンピュータ500全体の動作を制御する演算処理装置であり、コンピュータ500の制御処理部として機能する。   An MPU (Micro Processing Unit) 502 is an arithmetic processing unit that controls the operation of the entire computer 500, and functions as a control processing unit of the computer 500.

ROM(Read Only Memory)504は、所定の基本制御プログラムが予め記録されている読み出し専用半導体メモリである。MPU502は、この基本制御プログラムをコンピュータ500の起動時に読み出して実行することにより、このコンピュータ500の各構成要素の動作制御が可能になる。   A ROM (Read Only Memory) 504 is a read-only semiconductor memory in which a predetermined basic control program is recorded in advance. The MPU 502 reads out and executes this basic control program when the computer 500 is activated, thereby enabling operation control of each component of the computer 500.

RAM(Random Access Memory)506は、MPU502が各種の制御プログラムを実行する際に、必要に応じて作業用記憶領域として使用する、随時書き込み読み出し可能な半導体メモリである。   A RAM (Random Access Memory) 506 is a semiconductor memory that can be written and read at any time and used as a working storage area as necessary when the MPU 502 executes various control programs.

ハードディスク装置508は、MPU502によって実行される各種の制御プログラムや各種のデータを記憶しておく記憶装置である。MPU502は、ハードディスク装置508に記憶されている所定の制御プログラムを読み出して実行することにより、後述する各種の制御処理を行えるようになる。   The hard disk device 508 is a storage device that stores various control programs executed by the MPU 502 and various data. The MPU 502 reads out and executes a predetermined control program stored in the hard disk device 508, thereby performing various control processes described later.

入力装置510は、例えばマウス装置やキーボード装置であり、図6のシステムの利用者により操作されると、その操作内容に対応付けられている各種情報の入力を取得し、取得した入力情報をMPU502に送付する。   The input device 510 is, for example, a mouse device or a keyboard device, and when operated by a user of the system of FIG. Send to.

表示装置512は例えば液晶ディスプレイであり、MPU502から送付される表示データに応じて各種のテキストや画像を表示する。   The display device 512 is, for example, a liquid crystal display, and displays various texts and images according to display data sent from the MPU 502.

インタフェース装置514は、このコンピュータ500に接続される各種機器との間での各種情報の授受の管理を行う。   The interface device 514 manages the exchange of various information with various devices connected to the computer 500.

記録媒体駆動装置516は、可搬型記録媒体518に記録されている各種の制御プログラムやデータの読み出しを行う装置である。MPU502は、可搬型記録媒体520に記録されている所定の制御プログラムを、記録媒体駆動装置516を介して読み出して実行することによって、後述する各種の制御処理を行うようにすることもできる。なお、可搬型記録媒体218としては、例えばUSB(Universal Serial Bus)規格のコネクタが備えられているフラッシュメモリ、CD−ROM(Compact Disc Read Only Memory)、DVD−ROM(Digital Versatile Disc Read Only Memory)などがある。   The recording medium driving device 516 is a device that reads various control programs and data recorded on the portable recording medium 518. The MPU 502 can read out and execute a predetermined control program recorded in the portable recording medium 520 via the recording medium driving device 516, thereby performing various control processes described later. As the portable recording medium 218, for example, a flash memory equipped with a USB (Universal Serial Bus) standard connector, a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Only Only). and so on.

このようなコンピュータ500を用いて暗号処理装置を構成するには、例えば、上述の各処理部における処理をMPU502に行わせるための制御プログラムを作成する。作成された制御プログラムはハードディスク装置508若しくは可搬型記録媒体520に予め格納しておく。そして、MPU502に所定の指示を与えてこの制御プログラムを読み出させて実行させる。こうすることで、暗号処理装置10または、第1の類似ハッシュ生成部102、第2の類似ハッシュ生成部104、および/もしくは類似ハッシュ比較部106が備えている機能がMPU502により提供される。   In order to configure a cryptographic processing apparatus using such a computer 500, for example, a control program for causing the MPU 502 to perform the processing in each processing unit described above is created. The created control program is stored in advance in the hard disk device 508 or the portable recording medium 520. Then, a predetermined instruction is given to the MPU 502 to read and execute the control program. In this way, the functions provided in the cryptographic processing device 10 or the first similar hash generation unit 102, the second similar hash generation unit 104, and / or the similar hash comparison unit 106 are provided by the MPU 502.

このような暗号処理装置10を用いることによって、2つの文字列のハッシュ値、たとえば正規のパスワードと入力されたパスワードのハッシュ値を比較することによって、その2つの文字列が「近傍」にあるかどうかを判定することができる。   By using such a cryptographic processing device 10, whether the two character strings are in the “neighborhood” by comparing the hash values of the two character strings, for example, the hash value of the entered password and the input password. Whether it can be determined.

また、正規ユーザによるパスワード入力ミスと攻撃者によるパスワード入力ミスを見分けることができる。   In addition, it is possible to distinguish between an incorrect password input by an authorized user and an incorrect password input by an attacker.

上記暗号処理装置をパスワード認証のための装置として用いる場合、正規ユーザが誤ったパスワードを入力すると、入力されたパスワードは、部分的な文字列が一致するなど、正しいパスワードの「近傍」にあることが多い。ここで2つの文字列が互いに「近傍」にあるとは、全体の文字列の比較的高い割合の部分が一致することである。逆に、セキュリティを破ってログインしようとする攻撃者から入力されるパスワードが、正しいパスワードの近傍にあるケースは多くない。上記の装置によれば、正しいパスワードについて何文字かをワイルドカード文字に置換した文字列から得られるハッシュ値と、入力された文字列について何文字かをワイルドカード文字に置換した文字列から得られるハッシュ値とを比較することによって、入力ミスか総当たり攻撃かを判別することができる。   When the above cryptographic processing device is used as a device for password authentication, if a legitimate user enters an incorrect password, the entered password must be in the “nearby” position of the correct password, such as a partial character string matching. There are many. Here, that two character strings are “near each other” means that a relatively high portion of the entire character string matches. On the other hand, there are not many cases where the password entered by an attacker who tries to login after breaking the security is in the vicinity of the correct password. According to the above device, it is obtained from a hash value obtained from a character string obtained by substituting some wildcard characters for the correct password and a character string obtained by substituting some wildcard characters for the input character string. By comparing with the hash value, it is possible to determine whether it is an input error or a brute force attack.

<処理の例>
13〜16を参照して、処理の例を説明する。本処理では、ワイルドカード文字と呼ばれる特別な文字を使う。ワイルドカード文字は、あらかじめ一つに決めておく必要があるが、本来の入力文字列に決して含まれない文字であれば何でもよい。一般的にはASCIIコードで0から31の範囲および127にある制御文字は入力文字列に使われることが少ないため、これらのいずれかを使うことができる。
<Example of processing>
Referring to FIG. 13 to 16, an example of processing. In this process, a special character called a wild card character is used. The wild card character needs to be determined in advance, but may be any character that is never included in the original input character string. Generally, control characters in the range of 0 to 31 and 127 in the ASCII code are rarely used for the input character string, and any of these can be used.

また以降の説明では、類似比較できる最大文字数の既定値を16とする。さらに既定の長さにそろえるために使われるパディング文字もワイルドカード文字と同様に予め決めておく。パディング文字はワイルドカード文字とは別の文字であることが好ましい。   In the following description, the default value of the maximum number of characters that can be compared is 16. Furthermore, the padding character used for aligning with the predetermined length is also determined in advance in the same manner as the wild card character. The padding character is preferably a different character from the wildcard character.

また、装置が図12に示されているような汎用コンピュータである場合には、図13〜16および/または下記の説明は、そのような処理を行う制御プログラムを定義する。すなわち、以下では、下記に説明する処理を汎用コンピュータに行わせる制御プログラムの説明でもある。 If the apparatus is a general-purpose computer as shown in FIG. 12, FIGS. 13 to 16 and / or the following description define a control program for performing such processing. That is, hereinafter, it is also a description of a control program that causes a general-purpose computer to perform the processing described below.

13は、類似文字列生成処理での処理の流れを示すフローチャートの例である。図13は、入力文字列のうち1文字が別の文字に入れ替わっているような類似を検出できる例を示す。 FIG. 13 is an example of a flowchart showing the flow of processing in the similar character string generation processing. FIG. 13 shows an example in which a similarity in which one character in the input character string is replaced with another character can be detected.

S102で入力文字列受付部1020(1040)は、入力文字列sを受け取る。たとえば、s=「abcd」とする。   In step S102, the input character string receiving unit 1020 (1040) receives the input character string s. For example, s = “abcd”.

S104で入力文字列受付部1020(1040)は、S102で受け取った入力文字列sの末尾にパディング文字を既定文字数に達するまで追加する。s=「abcd」の場合は、パディング文字を「.」とすると、s=「abcd............」とする。   In S104, the input character string receiving unit 1020 (1040) adds padding characters to the end of the input character string s received in S102 until the predetermined number of characters is reached. In the case of s = “abcd”, if the padding character is “...”, then s = “abcd...

次に、S106で類似文字列群生成部1024(2044)は、文字位置を表す変数iを1に初期化する。   Next, in S106, the similar character string group generation unit 1024 (2044) initializes a variable i representing a character position to 1.

S108〜S112は、ループを構成しており、文字位置を表す変数iの値を1ずつ増加させながらループ処理を行う。ループはiの値が文字列sの長さを超えるまで繰り返す。   S108 to S112 constitute a loop, and the loop processing is performed while increasing the value of the variable i representing the character position by one. The loop is repeated until the value of i exceeds the length of the character string s.

S108で類似文字列群生成部1024(2044)は、文字列sのi文字目をワイルドカード文字、たとえば「?」に置換し、類似ハッシュデータとして、類似度=1、文字列tの組(1、t)を出力する。   In S108, the similar character string group generation unit 1024 (2044) replaces the i character of the character string s with a wildcard character, for example, “?”, And sets the similarity = 1 and character string t as similar hash data ( 1, t) is output.

たとえば、文字列s=「abcd............」の第1文字目をワイルドカード文字「?」に置き換え、類似ハッシュデータとして、類似度=1、文字列t=「?bcd............」の組(1、t)が出力される。   For example, the first character of the character string s = “abcd...” Is replaced with the wildcard character “?”, And similarity hash data 1 and character string t = A set (1, t) of “? Bcd...

S110で類似文字列群生成部1024(2044)は、文字位置を表す変数iを1つ増加させる。   In S110, the similar character string group generation unit 1024 (2044) increases the variable i representing the character position by one.

S112で類似文字列群生成部1024(2044)は、文字位置を表す変数iが文字列sの文字数を超えているかを判定する。もし、本判定の結果が“YES”、すなわち、文字位置を表す変数iがsの文字数を超えていれば、処理を終了する。もし、本判定の結果が“NO”、すなわち、文字位置を表す変数iがsの文字数を超えていなければ、S108に戻る。   In S112, the similar character string group generation unit 1024 (2044) determines whether the variable i representing the character position exceeds the number of characters in the character string s. If the result of this determination is “YES”, that is, if the variable i representing the character position exceeds the number of characters of s, the processing is terminated. If the result of this determination is “NO”, that is, if the variable i representing the character position does not exceed the number of characters of s, the process returns to S108.

S108〜S112の処理によって、類似度=1、文字列t=「?bcd............」の組から、類似度=1、文字列t=「abcd...........?」まで、16個の類似ハッシュデータが生成される。   By the processing of S108 to S112, similarity = 1 and character string t = “abcd ...” from the combination of similarity = 1 and character string t = “? Bcd... 16 similar hash data are generated until "...".

14は、1文字増減に対応した類似文字列生成処理での処理の流れを示すフローチャートの例である。本処理は、類似文字列群生成部1024(2044)によって処理される。 FIG. 14 is an example of a flowchart showing the flow of processing in the similar character string generation processing corresponding to increase / decrease of one character. This process is processed by the similar character string group generation unit 1024 (2044).

S202〜S206までは、上述のS102〜S106の処理と同一である。
S208で類似文字列群生成部1024(2044)は、文字列sのi文字目の直前にワイルドカード文字、たとえば「?」を挿入し、最後の文字を削除した文字列uを作る。たとえば、文字列s=「abcd............」でi=1であれば、文字列u=「?abcd...........」である。
S202 to S206 are the same as the processes of S102 to S106 described above.
In S208, the similar character string group generation unit 1024 (2044) inserts a wild card character, for example, “?” Immediately before the i-th character of the character string s, and creates a character string u with the last character deleted. For example, if the string s = “abcd...” And i = 1, then the string u = “? Abcd. .

次のS210で類似文字列群生成部1024(2044)は、文字列uのi+1 文字目がパディング文字である場合、またはi文字目が末尾の文字でi+1文字目が存在しない場合、文字列uの先頭にパディング文字を追加する。文字列s=「abcd............」でi=5であれば、文字列u=「.abcd?.........」である。この場合、末尾のパディング文字は削除されてもよい。   In the next S210, the similar character string group generation unit 1024 (2044) determines that the character string u if the i + 1 character of the character string u is a padding character, or if the i character is the last character and the i + 1 character does not exist. Add padding characters to the beginning of. If the character string s = “abcd...” And i = 5, then the character string u = “. Abcd... In this case, the padding character at the end may be deleted.

S212で類似文字列群生成部1024(2044)は、類似ハッシュデータとして、類似度=1、文字列uの組(1、u)を出力する。   In S212, the similar character string group generation unit 1024 (2044) outputs a set (1, u) of similarity = 1 and character string u as similar hash data.

S214〜S216の処理は、S110〜S112の処理と同一である。
S214で類似文字列群生成部1024(2044)は、文字位置を表す変数iを1つ増加させる。
The processing of S214 to S216 is the same as the processing of S110 to S112.
In S214, the similar character string group generation unit 1024 (2044) increases the variable i representing the character position by one.

S216で類似文字列群生成部1024(2044)は、文字位置を表す変数iが文字列sの文字数を超えているかを判定する。もし、本判定の結果が“YES”、すなわち、文字位置を表す変数iがsの文字数を超えていれば、処理を終了する。もし、本判定の結果が“NO”、すなわち、文字位置を表す変数iがsの文字数を超えていなければ、S208に戻る。   In S216, the similar character string group generation unit 1024 (2044) determines whether the variable i representing the character position exceeds the number of characters in the character string s. If the result of this determination is “YES”, that is, if the variable i representing the character position exceeds the number of characters of s, the processing is terminated. If the result of this determination is “NO”, that is, if the variable i representing the character position does not exceed the number of characters of s, the process returns to S208.

15は、2文字増減に対応した類似文字列生成処理での処理の流れを示すフローチャートの例である。図15は、入力文字列のうち2文字が別の文字に入れ替わっているような類似を検出できる例を示す。本処理は、類似文字列群生成部1024(2044)によって処理される。 FIG. 15 is an example of a flowchart showing a flow of processing in the similar character string generation processing corresponding to increase / decrease of two characters. FIG. 15 shows an example in which a similarity in which two characters in the input character string are replaced with another character can be detected. This process is processed by the similar character string group generation unit 1024 (2044).

この処理では、図14に示した1文字変更の場合と似ているが、すべての(i、j)の組(ただし、1≦i<j≦nで、nはパディング後の文字列sの長さ)に関してi文字目とj文字目をワイルドカード文字に置き換えた文字列tを作るため、二重のループで処理を行い、類似度2と文字列tの組を出力する。 This process is similar to the case of changing one character shown in FIG. 14 except that all (i, j) pairs (where 1 ≦ i <j ≦ n and n is the character string s after padding). In order to create a character string t in which the i-th character and j-th character are replaced with wildcard characters with respect to (length), processing is performed in a double loop, and a set of similarity 2 and character string t is output.

S302〜S306までは、上述のS102〜S106の処理と同一である。
S308〜S314は、(第2の)文字位置を表す変数jに関するループを構成しており、文字位置を表す変数jの値を1ずつ増加させながらループ処理を行う。ループはjの値が文字列sの長さを超えるまで繰り返す。
S302 to S306 are the same as the processes of S102 to S106 described above.
S308 to S314 form a loop for the variable j representing the (second) character position, and the loop processing is performed while increasing the value of the variable j representing the character position by one. The loop repeats until the value of j exceeds the length of the character string s.

S308では、文字位置を表(第2の)す変数jをi+1に初期化する。
S310で類似文字列群生成部1024(2044)は、文字列sのi文字目をワイルドカード文字、たとえば「?」に置換し、類似ハッシュデータとして、類似度=2、文字列tの組(2、t)を出力する。たとえば、文字列s=「abcd............」でi=1、j=2であれば、文字列t=「??cd...........」であり、i=1、j=16であれば、文字列t=「?bcd..........?」である。
In S308, a variable j representing the character position (second) is initialized to i + 1.
In S310, the similar character string group generation unit 1024 (2044) replaces the i character of the character string s with a wildcard character, for example, “?”, And sets similarity = 2 and character string t as similar hash data ( 2, t) is output. For example, if the character string s = “abcd...” And i = 1 and j = 2, the character string t = “? Cd. If i = 1 and j = 16, then the character string t = “? Bcd...

S312で類似文字列群生成部1024(2044)は、文字位置を表す(第2の)変数jを1つ増加させる。   In S312, the similar character string group generation unit 1024 (2044) increments the (second) variable j representing the character position by one.

S314で類似文字列群生成部1024(2044)は、文字位置を表す(第2の)変数jが文字列sの文字数を超えているかを判定する。もし、本判定の結果が“YES”、すなわち、文字位置を表す(第2の)変数jがsの文字数を超えていれば、S316に進む。もし、本判定の結果が“NO”、すなわち、文字位置を表す(第2の)変数jがsの文字数を超えていなければ、S310に戻る。   In S314, the similar character string group generation unit 1024 (2044) determines whether the (second) variable j representing the character position exceeds the number of characters in the character string s. If the result of this determination is “YES”, that is, if the (second) variable j representing the character position exceeds the number of characters of s, the process proceeds to S316. If the result of this determination is “NO”, that is, if the (second) variable j representing the character position does not exceed the number of characters of s, the process returns to S310.

S316で類似文字列群生成部1024(2044)は、文字位置を表す(第1の)変数iを1つ増加させる。   In S316, the similar character string group generation unit 1024 (2044) increments the (first) variable i representing the character position by one.

S318で類似文字列群生成部1024(2044)は、文字位置を表す(第1の)変数iが文字列sの文字数を超えているかを判定する。もし、本判定の結果が“YES”、すなわち、文字位置を表す(第1の)変数iがsの文字数を超えていれば、処理を終了する。もし、本判定の結果が“NO”、すなわち、文字位置を表す(第1の)変数iがsの文字数を超えていなければ、S308に戻る。   In S318, the similar character string group generation unit 1024 (2044) determines whether the (first) variable i representing the character position exceeds the number of characters in the character string s. If the result of this determination is “YES”, that is, if the (first) variable i representing the character position exceeds the number of characters of s, the process is terminated. If the result of this determination is “NO”, that is, if the (first) variable i representing the character position does not exceed the number of characters of s, the process returns to S308.

16は、比較処理での処理の流れを示すフローチャートの例である。
この処理は、入力された類似ハッシュデータをそれぞれNA、NBとしたとき、NAの中の類似ハッシュ値とNBの中の類似ハッシュ値が等しいものを探し、その中で対応する類似度のうちもっとも小さい値を出力する、という処理である。基本的にハッシュ値の元の文字列(第2ハッシュ関数作用部1026(1046)の入力)に同じ数のワイルドカード文字が含まれているときのみハッシュ値も一致するので、類似度が異なるハッシュ値同士が一致することはまずない。この処理は様々な方法で実現でき、たとえば類似ハッシュ値の集合同士から共通要素を取り出してから、そのうちで類似度の小さいものを探す、という方法でもよいが、以下ではあらかじめ類似度の小さい順にソートしてから前から順番に探す方法を示す。
FIG. 16 is an example of a flowchart showing the flow of processing in the comparison processing.
In this process, when the input similar hash data is NA and NB, respectively, a search is performed for a similar hash value in NA and a similar hash value in NB. This is a process of outputting a small value. Basically, the hash values match only when the same number of wildcard characters are included in the original character string of the hash value (the input of the second hash function operation unit 1026 (1046)), and thus the hashes having different degrees of similarity. The values are unlikely to match. This process can be realized in various ways. For example, a method may be used in which a common element is extracted from a set of similar hash values, and then a search is performed for those having a low similarity. Then, how to search in order from the front.

S402で類似ハッシュ比較部106は、類似ハッシュデータNAとNBを、それぞれ類似度昇順でソートする。   In S402, the similar hash comparison unit 106 sorts the similar hash data NA and NB in ascending order of similarity.

S404で類似ハッシュ比較部106は、類似ハッシュデータNAの先頭から順に類似度dA、ハッシュ値H(A)を取り出す。   In S404, the similar hash comparison unit 106 extracts the similarity dA and the hash value H (A) in order from the top of the similar hash data NA.

S406で類似ハッシュ比較部106は、類似ハッシュデータNBの先頭から順に類似度dB、ハッシュ値H(B)を取り出す。   In S406, the similar hash comparison unit 106 extracts the similarity dB and the hash value H (B) in order from the top of the similar hash data NB.

S408で類似ハッシュ比較部106は、dAとdBが等しく、かつH(A)とH(B)が等しいかを判定する。もし、本判定の結果が“NO”、すなわち、dAとdBが等しくない、またはH(A)とH(B)が等しくない場合には、S412に進む。また、本判定の結果が“YES”、すなわち、dAとdBが等しく、かつH(A)とH(B)が等しい場合には、S410に進む。   In S408, the similar hash comparison unit 106 determines whether dA and dB are equal and H (A) and H (B) are equal. If the result of this determination is “NO”, that is, dA and dB are not equal, or H (A) and H (B) are not equal, the process proceeds to S412. If the result of this determination is “YES”, that is, if dA and dB are equal and H (A) and H (B) are equal, the process proceeds to S410.

S410で類似ハッシュ比較部106は、類似度dA=dBを出力して、処理を終了する。   In S410, the similar hash comparison unit 106 outputs the similarity dA = dB and ends the process.

次のS412で類似ハッシュ比較部106は、類似ハッシュデータNBに残りの組があるかを判定する。もし、本判定の結果が“YES”、すなわち、類似ハッシュデータNBに残りの組がある場合には、S406に戻る。もし、本判定の結果が“NO”、すなわち、類似ハッシュデータNBに残りの組がない場合には、S414に進む。   In next step S412, the similar hash comparison unit 106 determines whether there is a remaining set in the similar hash data NB. If the result of this determination is “YES”, that is, if there are remaining pairs in the similar hash data NB, the process returns to S406. If the result of this determination is “NO”, that is, if there is no remaining set in the similar hash data NB, the process proceeds to S414.

次のS412で類似ハッシュ比較部106は、類似ハッシュデータNAに残りの組があるかを判定する。もし、本判定の結果が“YES”、すなわち、類似ハッシュデータNAに残りの組がある場合には、S404に戻る。もし、本判定の結果が“NO”、すなわち、類似ハッシュデータNAに残りの組がない場合には、S416に進む。   In next step S412, the similar hash comparison unit 106 determines whether there is a remaining set in the similar hash data NA. If the result of this determination is “YES”, that is, if there are remaining pairs in the similar hash data NA, the process returns to S404. If the result of this determination is “NO”, that is, if there is no remaining set in the similar hash data NA, the process proceeds to S416.

S416で類似ハッシュ比較部106は、類似ハッシュデータNAと類似ハッシュデータNBには類似のものがないという意味で、非類似であるという結果を出力して、処理を終了する。   In S416, the similar hash comparison unit 106 outputs a result of dissimilarity in the sense that there is no similarity between the similar hash data NA and the similar hash data NB, and ends the processing.

上記のような装置および方法により、2つ以上の入力に対応する暗号学的ハッシュ値の集合同士を比較するだけで、入力が互いに「近傍」にあるか否か、たとえば、それらの元データがn文字違いなどの条件で類似しているかどうかを知ることが可能である。特に、上記のような装置および方法では、元の値を秘匿したまま、入力が互いに「近傍」にあるか否かを判定することができる。   By comparing the sets of cryptographic hash values corresponding to two or more inputs by the apparatus and method as described above, whether or not the inputs are “neighboring” to each other, for example, their original data is It is possible to know whether they are similar under conditions such as n character differences. In particular, in the apparatus and method as described above, it is possible to determine whether the inputs are “near each other” while keeping the original value secret.

さらに、類似しているかどうかを知ることができるという点を除けば、元データや元データ間の関係がわからないという安全性は保たれる。   Furthermore, the safety that the original data and the relationship between the original data are not known is maintained except that it is possible to know whether or not they are similar.

上記のような装置および方法では、正しいパスワードの「近傍」にあるパスワード入力を判定するために必要とされるハッシュ値の数が少なくて済む。元データを構成する文字の数を最大nとすると、本方式では2×n個のハッシュ値で済ますことができる。   In the apparatus and method as described above, the number of hash values required to determine password input in the “neighborhood” of the correct password is small. Assuming that the number of characters constituting the original data is n at the maximum, this method can use 2 × n hash values.

暗号化されていない2つの元データについて、2つのデータに暗号学的ハッシュ関数を作用させて得られる2つの暗号化データを比較する場合、元データが少しでも異なるとハッシュ値はまったく異なる値になるため、元データが類似していることを知ることができない。しかし、上記の暗号処理装置、方法を用いることによって、2つの元データが互いに類似しているのか否かを、暗号化データの比較によって判定することができる。   When comparing two encrypted data obtained by applying a cryptographic hash function to the two data for the two unencrypted original data, the hash value will be completely different if the original data is slightly different. Therefore, it cannot be known that the original data is similar. However, by using the encryption processing apparatus and method described above, it can be determined by comparing encrypted data whether or not the two original data are similar to each other.

さらに、上記の暗号処理装置、方法では、2つの元データが互いに類似しているのか否かのもならず、2つの元データの「類似度」を、暗号化データの比較によって得ることができる。   Further, in the above-described cryptographic processing apparatus and method, it is possible to obtain the “similarity” of the two original data by comparing the encrypted data, regardless of whether the two original data are similar to each other. .

以上の実施形態に関し、さらに以下の付記を開示する。
(付記1)
第1の入力文字列に任意の文字として使用される第1のワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記第1のワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成する第1の類似文字列生成部と、
前記第1の類似文字列に暗号化関数を作用させて第1の比較暗号値を生成する第1の暗号化部と、
第2の入力文字列に任意の文字として使用される第2のワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記第2のワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成する第2の類似文字列生成部と、
前記第2の類似文字列に前記暗号化関数を作用させて第2の比較暗号値を生成する第2の暗号化部と、
前記第1の比較暗号値と前記第2の比較暗号値を比較して、前記第1の入力文字列と前記第2の入力文字列の類似度を判定する類似暗号比較部と、
を含む暗号処理装置。
(付記2)
第1の前記類似文字列群生成部および/または第2の前記類似文字列群生成部は、複数の類似文字列を生成する、付記1に記載の暗号処理装置。
(付記3)
さらに、
前記第1の入力文字列および前記第2の入力文字列が所定の長さより短い場合に、前記所定の長さに達するまでパディングするために特定のパディング文字を挿入する入力文字列受付部を含む付記1または2に記載の暗号処理装置。
(付記4)
前記似文字列群生成部は、前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数に依存して、前記入力文字列に対する類似度を出力する付記1乃至3のいずれか一項に記載の暗号処理装置。
(付記5)
前記第1の入力文字列および前記第2の入力文字列は、パスワードである付記1乃至4のいずれか一項に記載の暗号処理装置。
(付記6)
前記ワイルドカード文字は、制御文字である付記1乃至5のいずれか一項に記載の暗号処理装置。
(付記7)
前記暗号化関数はハッシュ関数である、付記1乃至6のいずれか一項に記載の暗号処理装置。
(付記8)
コンピュータによって実行される暗号処理方法であって、
第1の入力文字列に任意の文字として使用される第1のワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記第1のワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成することと、
前記第1の類似文字列に暗号化関数を作用させて第1の比較暗号値を生成することと、
第2の入力文字列に任意の文字として使用される第2のワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記第2のワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成することと、
前記第2の類似文字列に前記暗号化関数を作用させ第2の比較暗号値を生成することと、
前記第1の比較暗号値と前記第2の比較暗号値を比較して、前記第1の入力文字列と前記第2の入力文字列の類似度を判定することを、
を含む暗号処理方法。
(付記9)
前記類似文字列を生成することは、複数の類似文字列を生成する、付記6に記載の暗号処理方法。
(付記10)
さらに、
前記第1の入力文字列および前記第2の入力文字列が所定の長さより短い場合に、前記所定の長さに達するまでパディングするために特定のパディング文字を挿入することを含む付記7または8に記載の暗号処理方法。
(付記11)
前記類似文字列を生成することは、前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数に依存して、前記入力文字列に対する類似度を出力する付記7乃至9のいずれか一項に記載の暗号処理方法。
(付記12)
前記第1の入力文字列および前記第2の入力文字列は、パスワードである付記7乃至10のいずれか一項に記載の暗号処理方法。
(付記13)
前記ワイルドカード文字は、制御文字である付記7乃至11のいずれか一項に記載の暗号処理方法。
(付記14)
前記暗号化関数はハッシュ関数である、付記7乃至13のいずれか一項に記載の暗号処理方法。
(付記15)
第1の入力文字列に任意の文字として使用される第1のワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記第1のワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成し、
前記第1の類似文字列に暗号化関数を作用させて第1の比較暗号値を生成し、
第2の入力文字列に任意の文字として使用される第2のワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記第2のワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成し、
前記第2の類似文字列に前記暗号化関数を作用させて第2の比較暗号値を生成し、
前記第1の比較暗号値と前記第2の比較暗号値を比較して、前記第1の入力文字列と前記第2の入力文字列の類似度を判定する
処理をコンピュータに実行させるプログラム。
(付記16)
前記類似文字列を生成させる処理では、複数の類似文字列を生成させる処理をコンピュータに実行させる付記12に記載のプログラム。
(付記17)
さらに、
前記第1の入力文字列および前記第2の入力文字列が所定の長さより短い場合に、前記所定の長さに達するまでパディングするために特定のパディング文字を挿入する処理をコンピュータに実行させる付記13または14に記載のプログラム。
(付記18)
前記類似文字列を生成させる処理では、前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数に依存して、前記入力文字列に対する類似度を出力させる処理をコンピュータに実行させる付記13乃至15のいずれか一項に記載のプログラム。
(付記19)
前記第1の入力文字列および前記第2の入力文字列は、パスワードである付記13乃至16のいずれか一項に記載のプログラム。
(付記20)
前記ワイルドカード文字は、制御文字である付記13乃至17のいずれか一項に記載のプログラム。
(付記21)
前記暗号化関数はハッシュ関数である、付記7乃至13のいずれか一項に記載のプログラム。
Regarding the above embodiment, the following additional notes are disclosed.
(Appendix 1)
A character string obtained by inserting a first wildcard character used as an arbitrary character in the first input character string, or at least one character of the first input character string is the first wildcard character A first similar character string group generation unit that generates a character string obtained by replacing as a first similar character string;
A first encryption unit for generating a first comparison encryption value by applying an encryption function to the first similar character string;
A character string obtained by inserting a second wildcard character used as an arbitrary character in the second input character string, or at least one character of the second input character string is the second wildcard character A second similar character string group generation unit that generates a character string obtained by replacing as a second similar character string;
A second encryption unit for generating a second comparison encryption value by applying the encryption function to the second similar character string;
A similar encryption comparison unit that compares the first comparison encryption value and the second comparison encryption value to determine the similarity between the first input character string and the second input character string;
A cryptographic processing device including:
(Appendix 2)
The cryptographic processing device according to attachment 1, wherein the first similar character string group generation unit and / or the second similar character string group generation unit generates a plurality of similar character strings.
(Appendix 3)
further,
An input character string receiving unit that inserts a specific padding character for padding until the predetermined length is reached when the first input character string and the second input character string are shorter than a predetermined length; The cryptographic processing apparatus according to appendix 1 or 2.
(Appendix 4)
The compounds similar character string group generation unit, the depending on the number of substitution of wildcard insertion and / or said wild card, any one of Appendices 1 through 3 to output a similarity for the input character string The cryptographic processing device according to 1.
(Appendix 5)
The cryptographic processing apparatus according to any one of appendices 1 to 4, wherein the first input character string and the second input character string are passwords.
(Appendix 6)
The cryptographic processing apparatus according to any one of appendices 1 to 5, wherein the wild card character is a control character.
(Appendix 7)
The cryptographic processing apparatus according to any one of appendices 1 to 6, wherein the encryption function is a hash function.
(Appendix 8)
A cryptographic processing method executed by a computer,
A character string obtained by inserting a first wildcard character used as an arbitrary character in the first input character string, or at least one character of the first input character string is the first wildcard character Generating a character string obtained by substituting for the first similar character string;
Generating a first comparison cipher value by applying an encryption function to the first similar character string;
A character string obtained by inserting a second wildcard character used as an arbitrary character in the second input character string, or at least one character of the second input character string is the second wildcard character Generating a character string obtained by substituting for the second similar character string;
Applying the encryption function to the second similar character string to generate a second comparison cipher value;
Comparing the first comparison cipher value and the second comparison cipher value to determine the similarity between the first input character string and the second input character string;
A cryptographic processing method including:
(Appendix 9)
The cryptographic processing method according to attachment 6, wherein generating the similar character string generates a plurality of similar character strings.
(Appendix 10)
further,
Appendix 7 or 8 including inserting a specific padding character to pad until the predetermined length is reached when the first input character string and the second input character string are shorter than a predetermined length The cryptographic processing method described in 1.
(Appendix 11)
The generating of the similar character string includes any one of the appendixes 7 to 9 that output the similarity to the input character string depending on the number of insertions of the wild card and / or replacement with the wild card. The cryptographic processing method described in 1.
(Appendix 12)
The encryption processing method according to any one of appendices 7 to 10, wherein the first input character string and the second input character string are passwords.
(Appendix 13)
The encryption processing method according to any one of appendices 7 to 11, wherein the wild card character is a control character.
(Appendix 14)
The encryption processing method according to any one of appendices 7 to 13, wherein the encryption function is a hash function.
(Appendix 15)
A character string obtained by inserting a first wildcard character used as an arbitrary character in the first input character string, or at least one character of the first input character string is the first wildcard character A character string obtained by replacing with is generated as a first similar character string,
An encryption function is applied to the first similar character string to generate a first comparison encryption value;
A character string obtained by inserting a second wildcard character used as an arbitrary character in the second input character string, or at least one character of the second input character string is the second wildcard character A character string obtained by replacing with is generated as a second similar character string,
Generating a second comparison cipher value by applying the encryption function to the second similar character string;
A program for causing a computer to execute a process of comparing the first comparison encryption value and the second comparison encryption value to determine the similarity between the first input character string and the second input character string.
(Appendix 16)
The program according to appendix 12, which causes the computer to execute a process of generating a plurality of similar character strings in the process of generating the similar character string.
(Appendix 17)
further,
Supplementary note for causing a computer to execute a process of inserting a specific padding character for padding until the predetermined length is reached when the first input character string and the second input character string are shorter than a predetermined length. The program according to 13 or 14.
(Appendix 18)
The processing for generating the similar character string causes the computer to execute processing for outputting the similarity to the input character string depending on the number of times the wild card is inserted and / or replaced with the wild card. 15. The program according to any one of 15.
(Appendix 19)
The program according to any one of appendices 13 to 16, wherein the first input character string and the second input character string are passwords.
(Appendix 20)
The program according to any one of appendices 13 to 17, wherein the wild card character is a control character.
(Appendix 21)
The program according to any one of appendices 7 to 13, wherein the encryption function is a hash function.

10 暗号処理装置
102 第1の類似ハッシュ生成部
104 第2の類似ハッシュ生成部
106 類似ハッシュ比較部
1020、1040 入力文字列受付部
1022、1042 第1ハッシュ関数作用部
1024、1044 類似文字列群生成部
1026、1046 第2ハッシュ関数作用部
1060 主ハッシュ比較部
1062 類似ハッシュ値群比較部
DESCRIPTION OF SYMBOLS 10 Encryption processing apparatus 102 1st similar hash production | generation part 104 2nd similar hash production | generation part 106 Similar hash comparison part 1020, 1040 Input character string reception part 1022, 1042 1st hash function action | operation part 1024, 1044 Similar character string group production | generation Units 1026 and 1046 Second hash function operation unit 1060 Main hash comparison unit 1062 Similar hash value group comparison unit

Claims (9)

第1の入力文字列に任意の文字として使用されるワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記ワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成する第1の類似文字列生成部と、
前記第1の類似文字列に暗号化関数を作用させて第1の比較暗号値を生成する第1の暗号化部と、
第2の入力文字列に前記ワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記ワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成する第2の類似文字列生成部と、
前記第2の類似文字列に前記暗号化関数を作用させて第2の比較暗号値を生成する第2の暗号化部と、
前記第1の比較暗号値と前記第2の比較暗号値とが等しい場合前記第1の入力文字列における前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数と、前記第2の入力文字列における前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数とに基づいて、前記第1の入力文字列と前記第2の入力文字列の類似度を出力する類似暗号比較部と、
を含む暗号処理装置。
String obtained by inserting a used Ruwa-carded character as any character in the first input string or replacing at least one character of the first input string before Kiwa Ile-card characters, A first similar character string group generation unit that generates a character string obtained as a first similar character string;
A first encryption unit for generating a first comparison encryption value by applying an encryption function to the first similar character string;
String obtained by inserting the wildcard character in the second input string, or a character string obtained by replacing at least one character of the second input string before Kiwa Ile-card characters, A second similar character string group generation unit that generates a second similar character string;
A second encryption unit for generating a second comparison encryption value by applying the encryption function to the second similar character string;
When the first comparison encryption value and the second comparison encryption value are equal , the number of insertions and / or substitutions of the wildcard in the first input character string, and the second A similar encryption comparison unit that outputs the similarity between the first input character string and the second input character string based on the number of insertions and / or replacements with the wild card in the input character string When,
A cryptographic processing device including:
第1の前記類似文字列群生成部および/または第2の前記類似文字列群生成部は、複数の類似文字列を生成する、請求項1に記載の暗号処理装置。   The cryptographic processing apparatus according to claim 1, wherein the first similar character string group generation unit and / or the second similar character string group generation unit generates a plurality of similar character strings. さらに、
前記第1の入力文字列および前記第2の入力文字列が所定の長さより短い場合に、前記所定の長さに達するまでパディングするために特定のパディング文字を挿入する入力文字列受付部を含む請求項1または2に記載の暗号処理装置。
further,
An input character string receiving unit that inserts a specific padding character for padding until the predetermined length is reached when the first input character string and the second input character string are shorter than a predetermined length; The cryptographic processing apparatus according to claim 1 or 2.
前記似文字列群生成部は、前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数に依存して、前記入力文字列に対する類似度を出力する請求項1乃至3のいずれか一項に記載の暗号処理装置。 The compounds similar character string group generation unit, the depending on the number of substitution of wildcard insertion and / or the wildcard any one of claims 1 to 3 for outputting a similarity for the input character string The cryptographic processing device according to item. 前記第1の入力文字列および前記第2の入力文字列は、パスワードである付記1乃至4のいずれか一項に記載の暗号処理装置。   The cryptographic processing apparatus according to any one of appendices 1 to 4, wherein the first input character string and the second input character string are passwords. 前記ワイルドカード文字は、制御文字である請求項1乃至5のいずれか一項に記載の暗号処理装置。   The cryptographic processing apparatus according to claim 1, wherein the wild card character is a control character. 前記暗号化関数はハッシュ関数である、請求項1乃至6のいずれか一項に記載の暗号処理装置。   The cryptographic processing apparatus according to claim 1, wherein the encryption function is a hash function. 第1の類似文字列群生成部が、第1の入力文字列に任意の文字として使用されるワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記ワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成
第1の暗号化部が、前記第1の類似文字列に暗号化関数を作用させて第1の比較暗号値を生成
第2の類似文字列群生成部が、第2の入力文字列に前記ワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記ワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成
第2の暗号化部が、前記第2の類似文字列に前記暗号化関数を作用させ第2の比較暗号値を生成
類似暗号比較部が、前記第1の比較暗号値と前記第2の比較暗号値とが等しい場合前記第1の入力文字列における前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数と、前記第2の入力文字列における前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数とに基づいて、前記第1の入力文字列と前記第2の入力文字列の類似度を出力する
ことを含む暗号処理方法。
First similar string group generation unit comprises at least a first input string to any used as a character Ruwa Ile-string obtained by inserting the card character or the first input string, 1 a character string obtained by replacing the characters before Kiwa Ile-card characters, generates a first similar string,
The first encryption unit generates a first comparison encrypted value by applying an encryption function to the first similar string,
Second similar string group generation unit, a second input string to the character string obtained by inserting a wildcard character or the second input string at least a character before Kiwa Ile-card, the string obtained by replacing the character, generating a second similar string,
The second encryption unit generates the second comparison encrypted value by the action of the cryptographic function on said second similar string,
The number of insertions and / or substitutions to the wildcard in the first input character string when the similar encryption comparison unit has the first comparison encryption value equal to the second comparison encryption value And the degree of similarity between the first input character string and the second input character string based on the number of insertions and / or substitutions of the wild card in the second input character string. Output ,
Cryptographic processing method comprising.
第1の入力文字列に任意の文字として使用されるワイルドカード文字を挿入することで得られる文字列、または前記第1の入力文字列の少なくとも1文字を前記ワイルドカード文字に置換して得られる文字列を、第1の類似文字列として生成する第1の類似文字列群生成部と
前記第1の類似文字列に暗号化関数を作用させて第1の比較暗号値を生成する第1の暗号化部と
第2の入力文字列に前記ワイルドカード文字を挿入することで得られる文字列、または前記第2の入力文字列の少なくとも1文字を前記ワイルドカード文字に置換して得られる文字列を、第2の類似文字列として生成する第2の類似文字列群生成部と
前記第2の類似文字列に前記暗号化関数を作用させて第2の比較暗号値を生成する第2の暗号化部と
前記第1の比較暗号値と前記第2の比較暗号値とが等しい場合前記第1の入力文字列における前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数と、前記第2の入力文字列における前記ワイルドカードの挿入および/または前記ワイルドカードへの置換の回数とに基づいて、前記第1の入力文字列と前記第2の入力文字列の類似度を出力する類似暗号比較部として、
コンピュータを機能させるプログラム。
String obtained by inserting a used Ruwa-carded character as any character in the first input string or replacing at least one character of the first input string before Kiwa Ile-card characters, A first similar character string group generation unit that generates a character string obtained as a first similar character string ;
A first encryption unit for generating a first comparison encryption value by applying an encryption function to the first similar character string;
String obtained by inserting the wildcard character in the second input string, or a character string obtained by replacing at least one character of the second input string before Kiwa Ile-card characters, A second similar character string group generation unit that generates a second similar character string ;
A second encryption unit for generating a second comparison encryption value by applying the encryption function to the second similar character string;
When the first comparison encryption value and the second comparison encryption value are equal , the number of insertions and / or substitutions of the wildcard in the first input character string, and the second A similar encryption comparison unit that outputs the similarity between the first input character string and the second input character string based on the number of insertions and / or replacements with the wild card in the input character string As
A program that causes a computer to function .
JP2013004977A 2013-01-15 2013-01-15 Cryptographic processing apparatus, method and program Expired - Fee Related JP6040780B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013004977A JP6040780B2 (en) 2013-01-15 2013-01-15 Cryptographic processing apparatus, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013004977A JP6040780B2 (en) 2013-01-15 2013-01-15 Cryptographic processing apparatus, method and program

Publications (2)

Publication Number Publication Date
JP2014137423A JP2014137423A (en) 2014-07-28
JP6040780B2 true JP6040780B2 (en) 2016-12-07

Family

ID=51414969

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013004977A Expired - Fee Related JP6040780B2 (en) 2013-01-15 2013-01-15 Cryptographic processing apparatus, method and program

Country Status (1)

Country Link
JP (1) JP6040780B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295266A (en) * 2015-05-28 2017-01-04 阿里巴巴集团控股有限公司 Data inputting method and device
SG11201701399TA (en) * 2016-10-27 2018-06-28 Hewlett Packard Development Co Lp Replaceable item authentication
JP7464499B2 (en) 2020-10-28 2024-04-09 Kddi株式会社 Coding device, coding method, and coding program
KR102664104B1 (en) * 2021-11-04 2024-05-08 고려대학교 산학협력단 System and method for calculating the binding rate regarding data of pseudonymized information
CN116132159B (en) * 2023-02-02 2024-04-09 马上消费金融股份有限公司 Data encryption method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05189485A (en) * 1992-01-09 1993-07-30 Pfu Ltd Keyword retrieval system
JP2001117661A (en) * 1999-10-15 2001-04-27 Casio Comput Co Ltd Portable information terminal equipment and program recording medium for the same
CN1249972C (en) * 2000-06-05 2006-04-05 凤凰技术有限公司 System, methods, and software for remote password authentication using multiple servers
JP2009169615A (en) * 2008-01-15 2009-07-30 Hitachi Computer Peripherals Co Ltd Data leakage prevention method and magnetic disk device to which same method is applied
WO2011061862A1 (en) * 2009-11-17 2011-05-26 株式会社日立製作所 Authentication system using organism information, and authentication device

Also Published As

Publication number Publication date
JP2014137423A (en) 2014-07-28

Similar Documents

Publication Publication Date Title
CN103502992B (en) For the system and method for anti-tamper guiding
JP6504013B2 (en) Cryptographic processing method, cryptographic processing device, and cryptographic processing program
US8891768B2 (en) Increasing data security in enterprise applications by obfuscating encryption keys
US8284933B2 (en) Encrypting variable-length passwords to yield fixed-length encrypted passwords
US8995653B2 (en) Generating a secret key from an asymmetric private key
JP4843039B2 (en) User-friendly device authentication method and apparatus
JP6040780B2 (en) Cryptographic processing apparatus, method and program
KR101078546B1 (en) Apparatus for coding and decoding of security data file based on data storage unit idedtification, system for electronic signature using the same
US8472619B1 (en) Multiple validly decryptable messages
EP3637674A1 (en) Computer system, secret information verification method, and computer
EP3226164B1 (en) Watermarking input and output of a white-box implementation
JP2016522931A (en) Blocking password attacks
CN113688399A (en) Firmware digital signature protection method and device, computer equipment and storage medium
WO2009129017A1 (en) Methods, apparatus and system for authenticating a programmable hardware device and for authenticating commands received in the programmable hardware device from a secure processor
US7809130B1 (en) Password recovery system and method
US20130031373A1 (en) Product authentication based upon a hyperelliptic curve equation and a curve pairing function
CN116305080B (en) Universal password detection method
US10922292B2 (en) Metamorphic storage of passcodes
WO2018047120A1 (en) A system and method for data block modification detection and authentication codes
CN115086008B (en) Method and device for realizing password security protection, storage medium and electronic equipment
JP2015026892A (en) Information processing system
CN115935299A (en) Authorization control method, device, computer equipment and storage medium
Park et al. A study on the processing and reinforcement of message digest through two-dimensional array masking
JP2015082077A (en) Encryption device, control method, and program
KR102256231B1 (en) Digital forensic data decoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150903

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160610

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160719

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160915

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20161011

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161024

R150 Certificate of patent or registration of utility model

Ref document number: 6040780

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees