how did || come to be used in crypto texts to represent concatenation?












2














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 text's just kinda switched it up seems to make for an easy gotcha.










share|improve this question






















  • 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.
    – kelalaka
    3 hours ago










  • 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.
    – Maeher
    3 hours ago
















2














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 text's just kinda switched it up seems to make for an easy gotcha.










share|improve this question






















  • 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.
    – kelalaka
    3 hours ago










  • 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.
    – Maeher
    3 hours ago














2












2








2







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 text's just kinda switched it up seems to make for an easy gotcha.










share|improve this question













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 text's just kinda switched it up seems to make for an easy gotcha.







nist standards literature






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 10 hours ago









neubert

1,1591428




1,1591428












  • 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.
    – kelalaka
    3 hours ago










  • 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.
    – Maeher
    3 hours ago


















  • 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.
    – kelalaka
    3 hours ago










  • 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.
    – Maeher
    3 hours ago
















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.
– kelalaka
3 hours ago




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.
– kelalaka
3 hours ago












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.
– Maeher
3 hours ago




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.
– Maeher
3 hours ago










2 Answers
2






active

oldest

votes


















5














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 sum of
$$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 function). Cryptographers just lazily use $parallel$ as their sets are just rational numbers where nothing mathematically terrible will happen.






share|improve this answer





























    2














    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.






    share|improve this answer





















      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
      });


      }
      });














      draft saved

      draft discarded


















      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









      5














      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 sum of
      $$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 function). Cryptographers just lazily use $parallel$ as their sets are just rational numbers where nothing mathematically terrible will happen.






      share|improve this answer


























        5














        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 sum of
        $$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 function). Cryptographers just lazily use $parallel$ as their sets are just rational numbers where nothing mathematically terrible will happen.






        share|improve this answer
























          5












          5








          5






          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 sum of
          $$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 function). Cryptographers just lazily use $parallel$ as their sets are just rational numbers where nothing mathematically terrible will happen.






          share|improve this answer












          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 sum of
          $$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 function). Cryptographers just lazily use $parallel$ as their sets are just rational numbers where nothing mathematically terrible will happen.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          b degnan

          1,5991625




          1,5991625























              2














              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.






              share|improve this answer


























                2














                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.






                share|improve this answer
























                  2












                  2








                  2






                  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.






                  share|improve this answer












                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 hours ago









                  AleksanderRas

                  1,6541525




                  1,6541525






























                      draft saved

                      draft discarded




















































                      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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      サソリ

                      広島県道265号伴広島線

                      Setup Asymptote in Texstudio