Template: Infobox Function

From LibrePlanet
Jump to: navigation, search
(Created page with "===Description of fields=== (See talk page for an example) All fields except for ''name'' are optional. ====Header==== ;''name'' : Nam...")
 
Line 1: Line 1:
===Description of fields===
+
{{ infobox
(See [[Template talk:Infobox Block cipher|talk page]] for an example)
+
| title      = {{{name|<includeonly>{{PAGENAME}}</includeonly>}}}
 +
| image      = {{{image|}}}
 +
| caption    = {{{caption|}}}
  
All fields except for ''name'' are optional.
+
| header1    = {{#if:{{{designers|}}}{{{publish date|}}}{{{series|}}}{{{derived from|}}}{{{derived to|}}}{{{related to|}}}{{{certification|}}}|General}}
 +
| label2    = Designers
 +
| data2      = {{{designers|}}}
 +
| label3    = First published
 +
| data3      = {{{publish date|}}}
 +
| label4    = Series
 +
| data4      = {{{series|}}}
 +
| label5    = Derived from
 +
| data5      = {{{derived from|}}}
 +
| label6    = Successors
 +
| data6      = {{{derived to|}}}
 +
| label7    = Related&nbsp;to
 +
| data7      = {{{related to|}}}
 +
| label8    = Certification
 +
| data8      = {{{certification|}}}
  
====Header====
+
| header9    = {{#if:{{{digest size|}}}{{{key size|}}}{{{security claim|}}}{{{block size|}}}{{{state size|}}}{{{structure|}}}{{{rounds|}}}|{{#if:{{{key size|}}}{{{block size|}}}|Cipher detail|Detail}} }}
;''name''   : Name of the cipher or hash function (or preferably its abbreviation if the expansion contains multiple words and would not fit well).
+
| label10    = [[Cryptographic hash function|Digest size]]s
;''image''  : An illustrative image for the cipher or hash function; e.g. for Feistel-structured ciphers, this would typically be an illustration of the cipher's Feistel function.
+
| data10    = {{{digest size|}}}
;''caption'' : (Only if the image field is specified) caption for the image.
+
| label11    = [[Key size]]s
 +
| data11    = {{{key size|}}}
 +
| label12    = Security claims
 +
| data12    = {{{security claim|}}}
 +
| label13   = [[Block size (cryptography)|Block size]]s
 +
| data13    = {{{block size|}}}
 +
| label14    = State size
 +
| data14    = {{{state size|}}}
 +
| label15    = Structure
 +
| data15    = {{{structure|}}}
 +
| label16    = Rounds
 +
| data16    = {{{rounds|}}}
 +
| label17    = Speed
 +
| data17    = {{{speed|}}}
  
====General====
+
| header18  = {{#if:{{{cryptanalysis|}}}|Best public [[cryptanalysis]]}}
;''designers''    : Names of the designers/authors of the cipher or hash function, separated by commas. Should not contain organization names ''unless'' names of the real authors are unknown. The names should be linked if articles about them exist.
+
| below      = {{{cryptanalysis|}}}
;''publish date''  : Date that the cipher or hash function was first presented. If the exact date is unknown, this should at least contain the year number.
+
| belowstyle = line-height: 1.25em; text-align: left
;''series''        : A comma-separated list of ciphers or hash functions in a series, usually named similarly. For example, <!--... (block cipher);--> "MD, [[MD2]], MD3, [[MD4]], [[MD5]]" (hash function).
+
}}<includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}| {{#if:{{{digest size|}}}|[[Category:Cryptographic hash functions]]|{{#if:{{{block size|}}}|[[Category:Block ciphers]]|{{#if:{{{state size|}}}|[[Category:Stream ciphers]]}} }} }} }}</includeonly><noinclude>{{documentation}}<!-- Please add metadata to the <includeonly> section on the /doc subpage - thanks! -->
;''derived from''  : A comma-separated list of ciphers or hash functions that inspired the design of the block cipher or hash function. (Do not duplicate ''series'' here.)
+
</noinclude>
;''derived to''    : A comma-separated list of ciphers or hash functions whose design was inspired by the block cipher or hash function. (Do not duplicate ''series'' here.)
 
;''related to''    : A list of ciphers or hash functions that are otherwise related to the cipher or hash function. This field should be used minimally, and only when the relation is clearly significant.
 
;''certification'' : Cryptography expert groups that have selected or recommended this algorithm. For example, "[[AES finalist]]", "[[NESSIE]]", "[[CRYPTREC]]".
 
 
 
====Detail====
 
;''digest size''    : (hash functions only) Size of hash function digest output in bits. Should include the suffix "bits"; for example, "128 bits".
 
;''key size''        : (block or stream ciphers only) Key size or sizes that the cipher was originally designed to operate with, in bits. Should contain the suffix "bits". May contain multiple sizes. For example, AES submissions would have "128, 192 or 256 bits"
 
;''security claim''  : Any security claim or claims that the cipher or hash function was originally designed to achieve, in bits. Should contain the suffix "bits". May contain multiple sizes. For example, "128, 192 or 256 bits".
 
;''block size''      : (block ciphers only) Size or sizes of the input and output blocks of the block cipher. Should contain the suffix "bits". May contain multiple sizes.
 
;''state size''      : (stream ciphers only) Size of the stream cipher's internal state. Should contain the suffix "bits".
 
;''structure''      : If the cipher or hash function follows a common structure. For example, typical block ciphers should state "[[Feistel network]]" or "[[Substitution-permutation network]]" here.
 
;''rounds''          : The number or numbers of rounds the cipher or hash function was originally designed to work with.
 
;''speed''          : Speed of the algorithm, usually given in cpb (''[[cycles per byte]]''). NB! Do not conduct [[WP:OR|your own measurements]]; only cite published analysis. Also useful to include the [[processor architecture]] where measurements were done.
 
;''cryptanalysis''  : The best-known cryptanalysis for the cipher or hash function. Should contain a brief overview of the vulnerabilities and a [[WP:FOOT|footnote]] link to a relevant reference or references.
 
 
 
=== Extra features ===
 
* Articles on block ciphers that use this template are automatically included in the [[:Category:Block ciphers]] '''''if the ''block size'' parameter is used'''''.<br/>Articles on hash functions that use this template are automatically included in the [[:Category:Cryptographic hash functions]] '''''if the ''digest size'' parameter is used'''''.<br/>Articles on stream ciphers that use this template are automatically included in the [[:Category:Stream ciphers]] '''''if the ''state size'' parameter is used'''''.
 
 
 
==See also==
 
* <nowiki>{{</nowiki>[[Template:Crypto block|<nowiki>Crypto navbox|block</nowiki>]]}}, a navigation box for block ciphers.
 
* <nowiki>{{</nowiki>[[Template:Crypto block|<nowiki>Crypto navbox|stream</nowiki>]]}}, a navigation box for stream ciphers.
 
* <nowiki>{{</nowiki>[[Template:Crypto block|<nowiki>Crypto navbox|hash</nowiki>]]}}, a navigation box for cryptographic hash functions.
 
 
 
<includeonly>
 
{{DEFAULTSORT:Encryption method}}
 
[[Category:Cryptography infobox templates]]
 
[[Category:Technology and applied science infobox templates]]
 
 
 
[[fr:Modèle:Chiffrement par bloc]]
 
[[ja:Template:Infobox Encryption method]]
 
[[no:Mal:Infoboks blokkchiffer]]
 
[[pl:Szablon:Algorytm krypto infobox]]
 
[[ru:Шаблон:Блочный шифр]]
 
[[zh:Template:区块加解密方块]]
 
</includeonly>
 

Revision as of 11:51, 28 October 2013

This is the Template:Tl meta-template.

It helps other templates detect if they are on a "Template:" page or some "other" type of page.

Usage

This template usually takes two parameters, like this:

{{template other | Template page text | Other pages text }}

If the template is on a "Template:" page, it will return this:

Template loop detected: Template:Template other

If the template is on any other page, it will return this:

Template loop detected: Template:Template other

A typical usage case could be to make it so that a template only adds a category when not on a template page. Thus not adding the template itself and other templates that are built with it to the category. Like this:

{{template other | | [[Category:Some maintenance category]] }}

Note that in the example above the "template" parameter was left empty.

Demospace

For testing and demonstration purposes this template can take a parameter named demospace.

  • If it has the value template it returns the template page text.
  • It if has the value other or any other value such as the name of some other namespace it returns the other pages text.
  • If the parameter is empty or undefined, the actual page type determines the result.

Like this:

{{template other 
| Template page text 
| Other pages text 
| demospace = template
}}

No matter on what kind of page the code above is used it will return this:

Template loop detected: Template:Template other

You can make it so your template also understands the demospace parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this:

{{template other 
| Template page text 
| Other pages text 
| demospace = {{{demospace|}}}
}}

Technical details

This template detects "Template talk:" pages as type other.

This template works like Template:Tl, for more examples and technical details see full documentation there.

See also

Template:Namespace detect see also

50px Template documentation[create]