# what is meaning of operator “ := ” in cryptography?

I've seen := used in several cryptography papers where the this symbol has been used instead of assignment operator ($\leftarrow$ ) or equal sign (=), but never with an accompanying explanation. It's not exactly possible to search the precise meaning of operator ":= ". What is the exact meaning of this symbol in terms of mathematics in cryptography is concerned.

• – user991 Apr 23 '16 at 11:45
• I think you've never found an explanation because ":=" and "=" often mean the same. In particular, ":=" refers to a definition. – ssh3ll Apr 23 '16 at 11:54
• ":=" and "=" often mean the same. $\implies$ No, it does not mean the same thing. = is for the equality, while := is for the definition. This is semantically very different. Do not mistake it with the use of = in for example C or Java (which is why in these languages we have == for equality). – Biv Apr 23 '16 at 12:01
• A better approach is the one used in the Gallina language which use the same semantic as in Logic: = means equals, := is used for definitions but never in proofs. – Biv Apr 23 '16 at 12:04
• This is not really a question about cryptography, right? – eins6180 Apr 23 '16 at 13:12

Lindell and Katz use;

• $$\leftarrow$$ as possibly probabilistic process assignment. Some other uses $$\stackrel r\gets$$ or $$\stackrel\\gets$$
• $$:=$$ for deterministic process assignment.
• $$=$$ for equality

• $$\stackrel{def}{=}$$ for defining a variable.

There is not a single standard for pseudocode. The := operator is the assignment operator from Pascal, a programming language which was in widespread usage in the 1970s and 1980s, especially for teaching purposes. Many academics have thus been exposed to Pascal and remember it. In Pascal, the equality comparison is =, which matches mathematical practice.

By comparison, the C language (and languages that build on its syntactic conventions, including Java, C# and Javascript) uses = for assignment, thus requiring a distinct operator (==) for equality comparison.

Nowadays, article writers tend to use the left arrow ($\leftarrow$) for assignment (or even a right arrow, with the destination on the right), which is more intuitive for the reader and does not require background knowledge of Pascal, but it is less easy to type on a keyboard. Old-timers, who know Pascal and wrote articles before the generalization of LaTeX, tend to favour the := operator.

• Before Pascal := was used for assignment(note) (and = for equality) in algol, which was semi-officially intended to be the standard language for academic publication, and was in fact widely but not universally used for that. (note: with the proviso that algol68, which invented bizarre new names for almost everything, calls assignment 'assignation'.) – dave_thompson_085 Apr 24 '16 at 8:15