From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.157.38.142 with SMTP id l14mr6958916otb.124.1493482136518; Sat, 29 Apr 2017 09:08:56 -0700 (PDT) X-Received: by 10.157.39.138 with SMTP id c10mr213325otb.9.1493482136485; Sat, 29 Apr 2017 09:08:56 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!1.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!news.ripco.com!news.glorb.com!c26no869581itd.0!news-out.google.com!x200ni3115itb.0!nntp.google.com!c26no869575itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 29 Apr 2017 09:08:55 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.147.126.216; posting-account=pmkN8QoAAAAtIhXRUfydb0SCISnwaeyg NNTP-Posting-Host: 81.147.126.216 References: <7edc0e62-80fe-4a91-9015-69c781207fc8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <99a9a77c-ebde-424c-a62d-8ced7e4090b6@googlegroups.com> Subject: Re: Tasking and Concurrent Programming Using Multiple Ada Programs. From: Austin Obyrne Injection-Date: Sat, 29 Apr 2017 16:08:56 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:46646 Date: 2017-04-29T09:08:55-07:00 List-Id: On Saturday, April 29, 2017 at 2:56:37 PM UTC+1, Simon Wright wrote: > Austin Obyrne writes: > > > I have come over from sci crypt group to ask your advice on an > > encryption concept. The concept is a design plan to use a possible 36 > > ciphers (variants of the same basic cipoher and compatible to each > > other)in an Ada tasking program. > > > > The hoped for plan is to write a program that will cater for 36 (or > > less if needs be ) ciphers all reading in and immediately encrypting, > > in rotation from the same file of plaintext and writing out the > > resulting ciphertext to the same ciphertext file (the encrypted > > plaintext file). They would of course be written in Ada. > > I dont know why you want to do this, but - if you want to get a speed-up > - you won't. The problem isn't so much the reading of each successive > plaintext character and sending it to the encrypting task; the problem > is that the part of the program that writes the output must successively > wait for each of the encrypting tasks to provide its latest output > before writing it to the output medium. So the whole process is bounded > by the output. > > On the other hand, the effect of using tasks would be that each task > would see only every Nth character, so perhaps this is actually your > intent. If I was doing this I would look into using an abstract data > type (say, Encryption_State) to encapsulate the state needed to encrypt > the next character; arrange a procedure > > procedure Encrypt (State : in out Encryption_State; > Plain : Plain_Text_Character; > Result : out Encrypted_Text_Character); > > > and then arrange > > type State_Index is mod 36; > States : array (State_Index) of Encryption_State; > > so that as you pick the next input character you cycle round States to > pick the state to encrypt it with. Many , many thanks Simon. I think the ciphertext bit of your advice will be OK. Frankly I am not good enough to try out the Encrypt procedure. what I am geting from you is tacit confirmation that the plan is at least feasible. Speed of execution is not the target but the fact of each plaintext being encrypted by a different cipher is just unheard tactics todate and could be a new concept in cryptography. Also, there are 36 factoorial permutations of key order that Alice might use and exhaustive testing (Brute force per se) works out to about 1 million years (off the top of my head calculation. The topic is fairly well covered in my Ada study book but I needed confirmation from you experts. A thousand thanks from me. I will start experimenting when the remainder of the 36 variants is complete - done. Austin O'Byrne