4
$\begingroup$

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.

$\endgroup$
  • 2
    $\begingroup$ math.stackexchange.com/q/944757/57159 ​ ​ $\endgroup$ – user991 Apr 23 '16 at 11:45
  • $\begingroup$ I think you've never found an explanation because ":=" and "=" often mean the same. In particular, ":=" refers to a definition. $\endgroup$ – ssh3ll Apr 23 '16 at 11:54
  • 3
    $\begingroup$ ":=" 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). $\endgroup$ – Biv Apr 23 '16 at 12:01
  • $\begingroup$ 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. $\endgroup$ – Biv Apr 23 '16 at 12:04
  • 1
    $\begingroup$ This is not really a question about cryptography, right? $\endgroup$ – eins6180 Apr 23 '16 at 13:12
6
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ 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'.) $\endgroup$ – dave_thompson_085 Apr 24 '16 at 8:15
5
$\begingroup$

Lindel and Katz use;

  • $\leftarrow$ as possibly probabilistic process assignment. Some other uses $\underleftarrow{r}$
  • $:=$ for deterministic process assignment.
  • $=$ for equality
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.