From: adacrypt <austin.obyrne@hotmail.com>
Subject: Constrained or Unconstrained Arrays or just my my Ignorance.
Date: Mon, 27 Feb 2012 14:20:37 -0800 (PST)
Date: 2012-02-27T14:20:37-08:00 [thread overview]
Message-ID: <45dc4817-e418-4f2d-96cf-02eaa630064c@s7g2000vby.googlegroups.com> (raw)
In my Ada-95 driven crypto program I want to capture the frequency
spread of the ciphertext.
I am not sure if I am right or not in what I am doing – a ‘ploy’ I
use works under certain conditions and then not at all at other times
in a different application.
This is my method and the source code of my method.
CipherText item := 4675432 (say)
Q := CipherText;
I_Num(Q) := I_Num(Q)+1;
SUBTYPE Index_32 IS Integer RANGE MinValue .. MaxValue;
TYPE I_CoefficientsNumArray IS ARRAY(Index_32) OF Integer;
I_Num : I_CoefficientsNumArray;
-- counts the coefficients of the ciphertext.
-- Max Value and MinValue are the expected values of any ciphertext as
positive integers
*I use the value of the current ciphertext element to index the
(subscript) corresponding numerically to the array element where it
will be stored and I later print out the contents of all the array
elements to get the frequency spread of an entire encryption session..
1) Is this action legit in terms of Ada-95 Reference Manual? I am not
experienced enough to know myself.
I suspect it might not be quite proper but it works fine! I fear it
might just be bug that is working more by good luck than good design
by me - I hope this is kosher because I want to go on using it in the
future. It works as a procedure in a much larger program ok but does
not work at all in a second case 2) below..
2) When I try using this in a standalone program i.e. as the sole
purpose of a dedicated program that is meant to find the frequency
spread of any file that is read in experimentally, it definitely does
not work.
Your advice would be greatly appreciated.
I do a lot of crypto work in Ada-95.
I use agnat 311.p compiler in Windows XP.
- adacrypt
next reply other threads:[~2012-02-27 22:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 22:20 adacrypt [this message]
2012-02-27 23:46 ` Constrained or Unconstrained Arrays or just my my Ignorance Adam Beneschan
2012-02-28 0:52 ` adacrypt
2012-02-28 1:16 ` adacrypt
2012-02-27 23:46 ` Adam Beneschan
2012-02-28 1:36 ` adacrypt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox