{"id":2697,"date":"2012-04-13T14:30:49","date_gmt":"2012-04-13T12:30:49","guid":{"rendered":"http:\/\/macumbista.net\/?p=2697"},"modified":"2013-06-06T00:10:40","modified_gmt":"2013-06-05T22:10:40","slug":"cryptography-studies","status":"publish","type":"post","link":"http:\/\/macumbista.net\/?p=2697","title":{"rendered":"Cryptography Studies"},"content":{"rendered":"<p><iframe loading=\"lazy\" src=\"http:\/\/player.vimeo.com\/video\/40269296?title=0&amp;byline=0&amp;portrait=0\" width=\"400\" height=\"300\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen><\/iframe><\/p>\n<p><a href=\"http:\/\/vimeo.com\/40269296\">cryptography (study I)<\/a> from <a href=\"http:\/\/vimeo.com\/macumbista\">macumbista<\/a> on <a href=\"http:\/\/vimeo.com\">Vimeo<\/a>.<\/p>\n<p>I took a quick break from some <a href=\"http:\/\/www.kickstarter.com\/projects\/1886603128\/machine-deva-an-experimental-art-film\/posts\/177885\">soundtracking work<\/a> to build and document this little box over the weekend. I have been interested in examining the use of simple analog implementations of pseudo-random number generators, akin to those used in encryption algorithms, for the chaotic production of sound patterns. One of the simplest pseudo-random number generators is a three-stage shift register with a non-linear feedback loop, such as that found in <a href=\"http:\/\/electro-music.com\/forum\/viewtopic.php?t=38081\">Rob Hordijk&#8217;s &#8220;Benjolin&#8221;<\/a> instrument design. <\/p>\n<p><a href=\"http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/rungler_crop1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/rungler_crop1-400x183.png\" alt=\"\" title=\"rungler_crop\" width=\"400\" height=\"183\" class=\"alignnone size-medium wp-image-2700\" srcset=\"http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/rungler_crop1-400x183.png 400w, http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/rungler_crop1-1024x470.png 1024w, http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/rungler_crop1.png 1258w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p><em>Rungler schematic courtesy of Rob Hordijk, redrawn by <a href=\"http:\/\/casperelectronics.com\/finished-pieces\/benjolin\/\">Casper Electronics<\/a><\/em><\/p>\n<p>The most interesting part of the Benjolin is a circuit Hordijk calls a &#8220;rungler&#8221; (the rest of the Benjolin being two simple oscillators and a resonant filter). It is made up of a shift register in the middle (U4, a 4021B integrated circuit), an XOR (eXclusive OR) logic gate created by one transistor and an op-amp on the left, and finally a rudimentary Digital-to-Analog converter built around another op-amp on the right. Note the feedback from the last stage of the shift register to one input of the XOR, or what could be called the &#8220;poor man&#8217;s ring modulator&#8221;. The other XOR input comes from one of the two oscillators (P1).<\/p>\n<p>Hordijk <a href=\"http:\/\/electro-music.com\/forum\/viewtopic.php?t=38081&#038;postorder=asc\">writes<\/a>:<\/p>\n<blockquote><p>The purpose of the rungler is to create short stepped patterns of variable length and speed. [&#8230;] It needs two frequency sources to work and basically creates a complex interference pattern that can be fed back into the frequency parameters of the driving oscillators to create an unlimited amount of havoc.<\/p>\n<p>The rungler is basically a CMOS shift register clocked by one oscillator and receiving its data input from the other oscillator. The output bits of the shift register are used as [&#8230;] a 3 bit code that is fed into a 3 bit DA converter. This DA eight level output voltage is fed back to the oscillator frequency control inputs. The output of the DA is the &#8216;rungler CV signal'[&#8230;]<\/p>\n<p>When the rungler signal is fed back to the frequency parameters of the oscillators it will change the triangle waveforms and pulse widths of the oscillator outputs[&#8230;]<\/p>\n<p>The rungler will try to find a balanced state. In this way it behaves according to principle from Chaos Theory. There seems to be an unlimited amount of possible balanced states and when a balanced state is just slightly disturbed it can be noted that it takes a little time to find the next balanced state, with noticeable bifurcations, etc.<\/p><\/blockquote>\n<p>Now, a shift register itself is a quite simple idea; one has several stages, and information (an analog voltage in some cases, or a binary state in others) gets passed from one stage to the next every time the shift register gets a clock signal. Passing the last stage of the shift register back to the first results in a loop, however any sort of transformation done to the last stage before it gets sent back to the first (an XOR &#8220;ring modulation&#8221; in the Benjolin&#8217;s case) means that each iteration of the loop changes. This satisfies the basic requirements of chaotic syntheses: <em>that there is feedback, that there is nonlinearity and that there is sensitivity to initial conditions.<\/em> (see <em>Slater, Dan, \u201cChaotic Sound Synthesis\u201d, Computer Music Journal 22.2 19 September 1998, pp 12-19.<\/em>)<\/p>\n<p><a href=\"http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/arabesque.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/arabesque-400x318.png\" alt=\"\" title=\"arabesque\" width=\"400\" height=\"318\" class=\"alignnone size-medium wp-image-2702\" srcset=\"http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/arabesque-400x318.png 400w, http:\/\/macumbista.net\/wp-content\/uploads\/2012\/04\/arabesque.png 444w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>Not surprisingly, analog shift registers such as the one produced by Serge Tcherepnin were often referred to as &#8220;arabesque generators&#8221;, as in this image from <a href=\"http:\/\/www.cyndustries.com\/synapse\/intro.cfm\">Synapse Magazine<\/a> September\/October 1976. However, we could also refer to this structure as a Lindenmayer, or <a href=\"http:\/\/en.wikipedia.org\/wiki\/L-system\">L-system<\/a>. An L-system is essentially a grammatical system which rewrites itself for every new iteration according to a system of rules. <\/p>\n<p>Here is Lindenmayer&#8217;s original L-system for modeling the growth of algae:<\/p>\n<p>    variables : A B<br \/>\n    constants : none<br \/>\n    start  : A<br \/>\n    rules  : (A \u2192 AB), (B \u2192 A)<\/p>\n<p>which produces:<\/p>\n<p>    n = 0 : A<br \/>\n    n = 1 : AB<br \/>\n    n = 2 : ABA<br \/>\n    n = 3 : ABAAB<br \/>\n    n = 4 : ABAABABA<br \/>\n    n = 5 : ABAABABAABAAB<br \/>\n    n = 6 : ABAABABAABAABABAABABA<br \/>\n    n = 7 : ABAABABAABAABABAABABAABAABABAABAAB <\/p>\n<p>(Source: <a href=\"http:\/\/en.wikipedia.org\/wiki\/L-system\">Wikipedia<\/a>)<\/p>\n<p>In <em>Non-Standard Sound Synthesis with L-Systems<\/em>, <a href=\"http:\/\/modularbrains.net\/research.html\">Stelios Manousakis<\/a> refers to non-propagative L-systems as being similar to cellular automata algorithms in that the data produced doesn&#8217;t branch out and expand endlessly, but rather is used as rules for determining the output of each cell. In our 3 stage shift register example, the non-linear feedback applied to the last stage before it returns to the first would be the new &#8220;grammatical rule&#8221; applied to the next iteration.<\/p>\n<p>Now, another term we could use to describe a chaotically-produced series of binary numbers with a high sensitivity to the initial conditions (or &#8220;seed&#8221;) of the process which creates them is a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Pseudorandom_number_generator\">Pseudo-Random Number Generator<\/a> (also know as a Deterministic Random Bit Generator). And many implementations of a PRNG use what are called Linear Feedback Shift Registers to create those bits, which are the basic building blocks of many sorts of encryption processes. <\/p>\n<p>Our 3-bit Benjolin is a far cry from the 128- and 256-bit encryption algorithms commonly used for digital security today (to say nothing of the &#8220;uncrackable&#8221; 1024-bit scheme used by the <a href=\"http:\/\/en.wikipedia.org\/wiki\/RSA_%28algorithm%29\">RSA algorithm<\/a>), and probably bears a closer resemblance to the &#8220;shuffle&#8221; feature on my ITunes, which &#8220;randomly&#8221; seems to play back the same 220 songs out of the 22,000 in my MP3 collection. Or, as quantum mechanics pioneer John von Neumann joked, &#8220;Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin.&#8221; For the purpose of creating generative sound compositions in realtime, however, these pseudo-random bits appear to provide an interesting and &#8220;musical&#8221; balance between randomness and structure.<\/p>\n<p>Other circuits or projects involving the potentially chaotic use of shift registers and\/or pseudo-random number generators include the <a href=\"http:\/\/www.cgs.synth.net\/modules\/cgs34_asr.html\">CGS 34 ASR<\/a> (which is of course influenced by the original Serge ASR), the <a href=\"http:\/\/www.cgs.synth.net\/modules\/cgs31_digital_noise.html\">CGS 31 Digital Noise<\/a>, the <a href=\"http:\/\/www.electro-music.com\/forum\/viewtopic.php?t=30768\">random voltage generator<\/a> from the <a href=\"http:\/\/www.buchla.com\/historical\/b200\/208-programsource.html\">Buchla 208 &#8220;Music Easel&#8221;<\/a> and the mighty <a href=\"http:\/\/www.birthofasynth.com\/Scott_Stites\/Pages\/Klee_Birth.html\">Klee Sequencer<\/a>.<\/p>\n<p>As a footnote, I have to add that the man who first uttered the name &#8220;L-system&#8221; to me is the same man whose film is now sitting on my desktop, waiting to be scored. So with this musing on the cyclical nature of the universe, I bid you farewell for now.<\/p>\n<p><strong>Now Playing<\/strong><\/p>\n<p><strong>drudkh<\/strong>&#8211;<em>eternal turn of the wheel<\/em>[2012 season of mist]<br \/>\n<strong>earth<\/strong>&#8211;<em>angels of darkness demons of light II<\/em>[2012 southern lord]<br \/>\n<strong>keith fullerton whitman<\/strong>&#8211;<em>generators<\/em>[2012 editions mego]<br \/>\n<strong>mirroring<\/strong>&#8211;<em>foreign body<\/em>[2012 kranky]<br \/>\n<strong>oren ambarchi<\/strong>&#8211;<em>audience of one<\/em>[2012 touch]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cryptography (study I) from macumbista on Vimeo. I took a quick break from some soundtracking work to build and document this little box over the weekend. I have been interested in examining the use of simple analog implementations of pseudo-random number generators, akin to those used in encryption algorithms, for the chaotic production of sound [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[69,49,10,15,13],"class_list":["post-2697","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-benjolin","tag-chaos","tag-playlist","tag-synthesizer","tag-video"],"_links":{"self":[{"href":"http:\/\/macumbista.net\/index.php?rest_route=\/wp\/v2\/posts\/2697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/macumbista.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/macumbista.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/macumbista.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/macumbista.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2697"}],"version-history":[{"count":15,"href":"http:\/\/macumbista.net\/index.php?rest_route=\/wp\/v2\/posts\/2697\/revisions"}],"predecessor-version":[{"id":3611,"href":"http:\/\/macumbista.net\/index.php?rest_route=\/wp\/v2\/posts\/2697\/revisions\/3611"}],"wp:attachment":[{"href":"http:\/\/macumbista.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/macumbista.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2697"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/macumbista.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}