How did || come to be used in crypto texts to represent concatenation?
$begingroup$
In RFC5647, NIST SP 800-38D, etc., ||
is used to denote concatenation. How did that come to be?
In most programming languages ||
represents "or" and +
denotes concatenation and the fact that crypto texts just kind of mixed it up seems to make for an easy gotcha.
nist standards notation literature
$endgroup$
add a comment |
$begingroup$
In RFC5647, NIST SP 800-38D, etc., ||
is used to denote concatenation. How did that come to be?
In most programming languages ||
represents "or" and +
denotes concatenation and the fact that crypto texts just kind of mixed it up seems to make for an easy gotcha.
nist standards notation literature
$endgroup$
$begingroup$
Don't remember how it started to appears in articles, however, using plus was confusing with math plus if you don't carefully look at the notation of the articles.
$endgroup$
– kelalaka
Dec 24 '18 at 11:39
6
$begingroup$
I'd argue that it's programming languages that use weird notation. The symbol for logical or has as far as I can tell always been $lor$. So there isn't really any confusion.
$endgroup$
– Maeher
Dec 24 '18 at 11:53
add a comment |
$begingroup$
In RFC5647, NIST SP 800-38D, etc., ||
is used to denote concatenation. How did that come to be?
In most programming languages ||
represents "or" and +
denotes concatenation and the fact that crypto texts just kind of mixed it up seems to make for an easy gotcha.
nist standards notation literature
$endgroup$
In RFC5647, NIST SP 800-38D, etc., ||
is used to denote concatenation. How did that come to be?
In most programming languages ||
represents "or" and +
denotes concatenation and the fact that crypto texts just kind of mixed it up seems to make for an easy gotcha.
nist standards notation literature
nist standards notation literature
edited Dec 25 '18 at 3:25
Peter Mortensen
1152
1152
asked Dec 24 '18 at 4:15
neubertneubert
1,3571529
1,3571529
$begingroup$
Don't remember how it started to appears in articles, however, using plus was confusing with math plus if you don't carefully look at the notation of the articles.
$endgroup$
– kelalaka
Dec 24 '18 at 11:39
6
$begingroup$
I'd argue that it's programming languages that use weird notation. The symbol for logical or has as far as I can tell always been $lor$. So there isn't really any confusion.
$endgroup$
– Maeher
Dec 24 '18 at 11:53
add a comment |
$begingroup$
Don't remember how it started to appears in articles, however, using plus was confusing with math plus if you don't carefully look at the notation of the articles.
$endgroup$
– kelalaka
Dec 24 '18 at 11:39
6
$begingroup$
I'd argue that it's programming languages that use weird notation. The symbol for logical or has as far as I can tell always been $lor$. So there isn't really any confusion.
$endgroup$
– Maeher
Dec 24 '18 at 11:53
$begingroup$
Don't remember how it started to appears in articles, however, using plus was confusing with math plus if you don't carefully look at the notation of the articles.
$endgroup$
– kelalaka
Dec 24 '18 at 11:39
$begingroup$
Don't remember how it started to appears in articles, however, using plus was confusing with math plus if you don't carefully look at the notation of the articles.
$endgroup$
– kelalaka
Dec 24 '18 at 11:39
6
6
$begingroup$
I'd argue that it's programming languages that use weird notation. The symbol for logical or has as far as I can tell always been $lor$. So there isn't really any confusion.
$endgroup$
– Maeher
Dec 24 '18 at 11:53
$begingroup$
I'd argue that it's programming languages that use weird notation. The symbol for logical or has as far as I can tell always been $lor$. So there isn't really any confusion.
$endgroup$
– Maeher
Dec 24 '18 at 11:53
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
The origin is set theory and not programming languages. In the context of cryptography, I could describe a set that is
$$x_1 parallel x_2 parallel dots parallel x_n$$
as a concatenation of the series described by
$$parallel_{i=1}^n x_i.$$
Furthermore, it's worth noting that +
to a mathematician would suggest that it is a commutative, which might not be true depending on the set (as we could have a set of functions).
$endgroup$
3
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
add a comment |
$begingroup$
Some languages like PL/I and Oracle Database SQL indeed use ||
for string concatenation.
One reason is maybe that +
might be confusing when talking about fundamental cryptography, since there is a lot of math involved. The mathematical notation for 'OR' would be reversed caret $lor$ and the exclusive 'OR', better known as 'XOR' is a circled plus $oplus$.
But I don't think that there is a specific reason for using ||
for a string concatenation. If anything then I would presume that someone used it once early and then it has become accustomed until it has become a standard for cryptography.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "281"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f66067%2fhow-did-come-to-be-used-in-crypto-texts-to-represent-concatenation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The origin is set theory and not programming languages. In the context of cryptography, I could describe a set that is
$$x_1 parallel x_2 parallel dots parallel x_n$$
as a concatenation of the series described by
$$parallel_{i=1}^n x_i.$$
Furthermore, it's worth noting that +
to a mathematician would suggest that it is a commutative, which might not be true depending on the set (as we could have a set of functions).
$endgroup$
3
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
add a comment |
$begingroup$
The origin is set theory and not programming languages. In the context of cryptography, I could describe a set that is
$$x_1 parallel x_2 parallel dots parallel x_n$$
as a concatenation of the series described by
$$parallel_{i=1}^n x_i.$$
Furthermore, it's worth noting that +
to a mathematician would suggest that it is a commutative, which might not be true depending on the set (as we could have a set of functions).
$endgroup$
3
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
add a comment |
$begingroup$
The origin is set theory and not programming languages. In the context of cryptography, I could describe a set that is
$$x_1 parallel x_2 parallel dots parallel x_n$$
as a concatenation of the series described by
$$parallel_{i=1}^n x_i.$$
Furthermore, it's worth noting that +
to a mathematician would suggest that it is a commutative, which might not be true depending on the set (as we could have a set of functions).
$endgroup$
The origin is set theory and not programming languages. In the context of cryptography, I could describe a set that is
$$x_1 parallel x_2 parallel dots parallel x_n$$
as a concatenation of the series described by
$$parallel_{i=1}^n x_i.$$
Furthermore, it's worth noting that +
to a mathematician would suggest that it is a commutative, which might not be true depending on the set (as we could have a set of functions).
edited Dec 25 '18 at 2:27
answered Dec 24 '18 at 12:16
b degnanb degnan
2,0481829
2,0481829
3
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
add a comment |
3
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
3
3
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
While I agree that the notation comes from mathematics, I'm not sure exactly what you mean by "a set that is [...] a concatenation sum". I've seen $|$ used to denote the concatenation of strings or tuples, such that if $a = (1,2)$ and $b = (3,4,5)$, then $a,|,b = (1,2,3,4,5)$, and of course one can naturally generalize this to sets of strings or tuples, but I'm not sure if that's what you mean. Or what, if anything, rational numbers have to do with any of it.
$endgroup$
– Ilmari Karonen
Dec 24 '18 at 21:29
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
$begingroup$
@IlmariKaronen Good points, I will update the answer to reflect that. I was being lazy as it's a holiday here. The real numbers note was just me pointing to that cryptography uses numbers. My work usually has concatenation of functions in a set; however, the set is bounded so I cannot just have general statements without something running out of the bounds.
$endgroup$
– b degnan
Dec 25 '18 at 2:26
add a comment |
$begingroup$
Some languages like PL/I and Oracle Database SQL indeed use ||
for string concatenation.
One reason is maybe that +
might be confusing when talking about fundamental cryptography, since there is a lot of math involved. The mathematical notation for 'OR' would be reversed caret $lor$ and the exclusive 'OR', better known as 'XOR' is a circled plus $oplus$.
But I don't think that there is a specific reason for using ||
for a string concatenation. If anything then I would presume that someone used it once early and then it has become accustomed until it has become a standard for cryptography.
$endgroup$
add a comment |
$begingroup$
Some languages like PL/I and Oracle Database SQL indeed use ||
for string concatenation.
One reason is maybe that +
might be confusing when talking about fundamental cryptography, since there is a lot of math involved. The mathematical notation for 'OR' would be reversed caret $lor$ and the exclusive 'OR', better known as 'XOR' is a circled plus $oplus$.
But I don't think that there is a specific reason for using ||
for a string concatenation. If anything then I would presume that someone used it once early and then it has become accustomed until it has become a standard for cryptography.
$endgroup$
add a comment |
$begingroup$
Some languages like PL/I and Oracle Database SQL indeed use ||
for string concatenation.
One reason is maybe that +
might be confusing when talking about fundamental cryptography, since there is a lot of math involved. The mathematical notation for 'OR' would be reversed caret $lor$ and the exclusive 'OR', better known as 'XOR' is a circled plus $oplus$.
But I don't think that there is a specific reason for using ||
for a string concatenation. If anything then I would presume that someone used it once early and then it has become accustomed until it has become a standard for cryptography.
$endgroup$
Some languages like PL/I and Oracle Database SQL indeed use ||
for string concatenation.
One reason is maybe that +
might be confusing when talking about fundamental cryptography, since there is a lot of math involved. The mathematical notation for 'OR' would be reversed caret $lor$ and the exclusive 'OR', better known as 'XOR' is a circled plus $oplus$.
But I don't think that there is a specific reason for using ||
for a string concatenation. If anything then I would presume that someone used it once early and then it has become accustomed until it has become a standard for cryptography.
answered Dec 24 '18 at 12:13
AleksanderRasAleksanderRas
2,9521935
2,9521935
add a comment |
add a comment |
Thanks for contributing an answer to Cryptography Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f66067%2fhow-did-come-to-be-used-in-crypto-texts-to-represent-concatenation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Don't remember how it started to appears in articles, however, using plus was confusing with math plus if you don't carefully look at the notation of the articles.
$endgroup$
– kelalaka
Dec 24 '18 at 11:39
6
$begingroup$
I'd argue that it's programming languages that use weird notation. The symbol for logical or has as far as I can tell always been $lor$. So there isn't really any confusion.
$endgroup$
– Maeher
Dec 24 '18 at 11:53