Template:User committed identity/doc: Difference between revisions

m
17 revisions imported: testing
(→‎See also: uneeded)
m (17 revisions imported: testing)
 
(15 intermediate revisions by 7 users not shown)
Line 18:
Italicized text should be replaced with appropriate input, or its parameter should be removed. Parameters are represented by 'parameter=<var>value</var>", and separated by vertical bars |.
*Replace "hash" with the hash produced from your secret string. The implicit name of this parameter is "1" (see [[en:Help:Template#Example: numeric parameter substitution|numeric parameters]]).
*The "hash function used" parameter, if not included, defaults to [[en:SHA-512|SHA-512]]. (This hash function is strongly recommended.) If you would like to link the hash function to a wikipedia page, you can supply the interwiki link. For example, using <code><nowiki>[[en:Whirlpool (cryptography)|WHIRLPOOL]]</nowiki></code> will show [[en:Whirlpool (cryptography)|WHIRLPOOL]] in the template
*The "background" parameter, if not included, defaults to #E0E8FF (<span style="background-color: #E0E8FF;">light blue</span>, see [[en:Web colors#Hex triplet]])
*The "border" parameter, if not included, also defaults to #E0E8FF.
Line 32:
# Try not to choose a secret string that represents your identity that could go completely out of date. So, for instance, it may be bad to choose a string that specifies ''only'' your telephone number as that number might change.
# If you want to change your secret string, do so, but keep track of all your old secret strings. It is best to reveal all of them if you ever want to confirm your identity, as this will establish that you are the same person who used your account from the first moment the committed identity was published.
# Your secret string should not be short. A dedicated attacker could, by brute force, try short strings until they find your secret string, but if your string is longer that attack would be impractical. If your string is 15 characters long, there are around 10<sup>27</sup> strings of that length, or an [[en:octillion|octillion]] (and that's just counting alphanumeric strings with spaces).
# Your secret string should not only contain an email address, name or phone number, but should contain hard to guess components. "jsmith@hotmail.com" for example may be vulnerable to both [[en:dictionary attack]]s and a search of email addresses, enabling attackers to check 'only' those hundred million names against all published hashed identities, which is computationally much easier than trying to identify a randomly chosen string.
<templatedata>
{
"params": {},
"format": "inline"
}
</templatedata>
 
=== <includeonly>Heading text</includeonly><div class="references-small"> ===
 
=== Getting the hash ===
Be sure to note the ''exact string'' you enter into the form, in case you need to use it later. It is important that this string be both easily remembered exactly by you and hard to guess or find by any intruder - if an intruder knows the secret string, then this scheme is useless and provides no security. One's username is public and trivially guessable; one's password is not a good choice either, as in the event of a compromised account, the password is likely to have been guessed.
 
On [[en:Unix-like|Unix-like]] operating systems the <code>[[en:md5sum|md5sum]]</code>, <code>[[en:sha1sum|sha1sum]]</code>, <code>sha224sum</code>, <code>sha256sum</code>, <code>sha384sum</code>, and <code>sha512sum</code> programs are provided in the [[en:GNU Core Utilities]]. Windows users may use one of the methods mentioned below; those who have [[en:PowerShell|PowerShell]] installed can generate a hash using the following command. Provide your secret phrase in the location indicated:
 
<code>[bitconverter]::tostring((new-object security.cryptography.sha512managed).computehash([text.encoding]::utf8.getbytes("Secret phrase here"))).replace("-", "")</code>
Line 59 ⟶ 67:
 
An attacker without access to the account could claim that the current account's owner stole their identity. The attacker could state that they did not publish a hash when they used to own the account, or that they did not register an account and that someone else is using their name.
 
An attacker may want to know the secret passphrase, pretending he wants to verify your ownership. He will use social behavior to convince you that you must reveal it. Then by revealing him the passphrase to him, he can pretend he is now the "legitimate" owner of your account, and act on your behalf without asking you anything. The passphrase verification (necessarily made by someone else) is inherently unsecure.
 
This weakness does not indicate the [[en:commitment scheme]] is worthless, because the ''commit phase'' did not apply to all interested parties (the real person and all potential attackers).
 
== Better protection ==
 
But a real protection should use a two-keys echange mechanism based on asymetric key pairs:
* these keys are used to encrypt on one side (and decrypt on the other side) the hashes of the plain-text request (that does not need to be encrypted itself) which also contains in clear text the public key of the sender; the hash then terminates each message and authenticates its sender. When replying, your response must contain (in its clear text) the initial encrypted hash that was in the verifier request, so that your reply cannot be reused as a formal acceptation for an unrelated request. In both cases, the hashes are encrypted using the private key (never revealed to any one) of each message sender: each one "reveals" only his public key.
* The hashes should be computed by including the content of the clear-text message, so that this message cannot be altered maliciously by anyone else (the hash asserts that the text is authentic and comes only from the user that owns the private key, and because this public hash is then followed by a secretly encrypted hash of all the previous content, it cannot be reused for unrelated responses; and it's still easy to assert that this second encrypted hash can be decrypted successfully using the public key of the message sender, to check that it matches his public key also present in the clear-text message and as well the public key can assert that the first message and its hash was not altered).
* But for that goal you still need a strong hashing algorithm (SHA256 at least) in addition to the encryption algorithm with asymetric key pairs used to sign the hashes and authenticate each sender. Asymetric encryption is known to be slow for long messages, but this should not be a problem because it will encrypt only strong hashes (this also secures the asymetric encryption to protect the private keys which are typically longer than hashes and cannot be infered from the public keys that are also longer than the hashes). With SHA256 or SHA512 used for the hash, you can then use asymetric encryption with 1024-bit asymetric keys. With that the "commitment" of each one can be trustable because everyone keeps his secrets but signed authenticated messages can be safely archived, and published as an evidence, a proof that cannot be later denied by any one (not even by the sender of each signed message that should attest with his signature that he is alone to own and control the private key).
* The mechanism can be used as a proof of authenticity for any kind of message, request, or reply: what is authentic is the clear-text text of the message that contains any kind of public information that one can trust, so it can contain a public account name, or the date of the message and the nature of the request. Its authenticity is proven by the fact it still contains the encrypted hashes that were kept unseparable from the clear-text message containing all the necessary public information that cannot be altered without breaking the secure hashes (which can no longer be decrypted with the public key of the orignal message sender. It can then be used to authenticate a verification request, and its reply.
* Each user must only publish his own public key and never has to give his private key. The user can also change the public key (and his private key) later on his public page at any time (and this change can be verified by issuing a request to the account owner to prove that he still also owns the former private key (that must be kept for a reasonnable time) and not just the new public key that replaced the old one on the account.
 
Such mechanism is used in emails (e.g. with PGP), or for authenticating web sites (using server certificates that contain their public key and other proof of their alleged identity, because it has been signed by a third-party using exchanges based also an asymetric cryptography with key pairs for the site owner and key pairs for the third-party signatory).
 
Wikimedia also uses such mechanism for [[OTRS]] (for authenticating the licencing agreement and the opposable assertions made by the publisher that either he owns the legal rights on the published content, or that he received the necessary and proovable formal authorization of publication from the legal owner of these rights).
 
==See also==
Line 72 ⟶ 95:
{{DEFAULTSORT:Committed Identity}}
[[Category:User namespace templates]]
 
<!-- Interwikis -->
[[de:Vorlage:User committed identity]]
[[fr:Modèle:Utilisateur identifiable]]
[[id:Templat:Pengguna berkomitmen identitas]]
[[sr:Шаблон:Корисник ковертирани идентитет]]
[[zh:Template:User committed identity]]
</includeonly>