[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
talk:encryption
This page is to discuss "encryption". You can ask questions or make comments.
What is a talkpage?
Source Code: 	http://www.ep.net.au/docs/ant/0.3.0.38.zip
		http://www.ep.net.au/docs/ant/0.3.0.39.zip
Author:		Simon A Roberts
Group:		Exitstencil Press Pty ltd (Australia)
Country:	Australia
Topic:		Internal Encyrption Engines 
Keywords:	Chaos Thereom, I-ching, NRG File, Fuzzy Math
---------------------------------------------------------------------

[1.0] - Alphanumber to Trigrams [-:: ANTdb 0.3.0.39 ::-]

Have you looked at the Revamped I-Ching based encryption. NRG is a 3 key based encryption algorithm, where 2 keys can be cycled over a link. the 3rd Key is a mapping key that plots between several numeric arrays that allow for the Decryption process to plot the correct asci character to reproduce.

  • ** This code produces and exact CRC and MD5 Checksum reproduction of the data that you encyrpt with it.
The I-ching is a 5000 year old language of china, it exist over 5000 years ago and it has 64 Individual Characters or Icon if you may consisting of broken and joined lines. This was possibly a list of chemicals as part of there alchemy or a method of explaining feudal land. The I-Ching is still a great mystry. However this application that is primary a text analyser; it will translate any written text into layered colour coded versions of the i-ching on the screen and displays it path and statistics at a push of a button.

ANTdb also explore advanced file encryption of files and will produce and exact MD5 checksum in reproducing the file on another computer. There is a little expansion of the file due to the high encryption rate. There is 14 bits to every 8 bits in the encrpyted NRG File that is the data in 6 bit and the rest key 3 which is a stream the same length as the file.



[1.1] - Key 3

As you can tell, there are 64 icons in the i-ching so this is an array of 8 bytes by 8 bytes. You can fit 4 of these into the ASCII chart.

So here is Key 3 - A stream of data that suggests which chart to plot from in reproducing or encyrpting the data. In a binary chain, relation to the character reference point. This stream of data consists of 2 bits, 01 (Chart 1), 10 (Chart 2), 11 (Chart 3) & 00 (Chart 4). Relating to the one of four, i-ching charts, which is in fact key 2.

[1.2] - Key 2 [ stored in .KEY File ]

which is only a numeric list ranging between 1 and 64 set in an array 8 bytes by 8 bytes. This number between 1 and 64 is added to the result code of Key 3 to recreate the ascii code number of the character being decrypted.



[1.3] - Key 3 [ stored in .KEY File ]

This is the type sequence or what is refered to in printing as the typeset. Each Trigram consist of 2 elements. Each Element consists of 3 lines either broken of joined of a combination of these. There are 8 total combinations of an element.

So when you change key 3, you change the order of which the elements a represented in sequence with the verticle and horizonal lengths of an (8,8) array ie (X,Y). Lets say with the Array on X axis in column 0 and on the Y axis on row 0, that the element looks like this:
	---------
	---------
	---   ---
		[diagram 2.0]
If we generate array number (0,0) as a triagram it will look like this:
   X =	---------
	---------
	---   ---
   Y =	---------
	---------
	---   ---
	'110110xx'
		[diagram 2.1]


if we change the element order or the sequence that the elements appear on the row and columns of the array (Key 2) then we start generating different sequences of Trigrams. So if we change the element number 0 (diagram 2.0) to something like:

	---   ---
	---   ---
	---------
		[diagram 2.3]


Then once this elemental change has happened then the sort of trigram we generate from querying (0,0) will look like:
   X =	---   ---
	---   ---
	---------
   Y =	---   ---
	---   ---
	---------
	'001001xx'
		[diagram 2.4]


[1.4] - What is a Trigram?

A trigram is a 6 bit sequence of data in memory (in this example)

Here is what is called a Trigram, it is 6 Lines either broken once in the middle or joined. This is what the i-ching consist of... the 64 combination of 6 lines either broken or joined. Where a line is represented as 1 bit in memory so if a line is broken this is 0 (No) or is joined the bit is 1 (Yes).
	---   ---
	---------
	---   ---
	---------
	---   ---
	---------
	   	[diagram 2.2]
To this triagram as seen above in diagram 2.2 would look like '010101' in memory, this plus Key 3. Lets say this triagram in the NRG is from chart 3 (see 1.1) the further 2 bits of data will relate to this sequence of binary. This 2 extra bits is '11' so the full byte of the Trigram is '01010111' which is 87 in decimal.

[1.5] - What is the Buffer length option for

  • * The buffer length the longer it is set the more memory is used in converting the data. I would not recommend running a high buffer on less than 128mb of ram.
For the data that is stored in the NRG File Records, the longer the buffer the smaller the binary blowout that occurs with the bit ratio's in the recorded file. Remember VB and most other languages will store Type Declaration as records in a file (Like a database kinda).

ANTdb will store the data in a compressed byte in the file consisting of 4 Trigrams to every 3 Bytes. This is infact 6 bit storage or transmittion of the raw data.



[1.6] - How do you produce a exact file CRC in Visual basic 6.0

Well I tell you it is nice the way Visual Basic compiles using a c kernel. It is also nice how the binary files are records in a file so you can index them. This does not really help in reproduction of a file exactly as there are offern extra bits written to a file when using the Put function.

Here where this API becomes most useful:

Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Any) As Long

It allows you to write byte arrays to a file, sequencally. So in this example I am reusing a 1 bit array to recreate the file from an encrypted binary file (NRG File).

[1.7] - Database facility

Well the database system allows you to post your own Notes and logs and history, this could be used in record sequences of DNA which also has 64 main segments and is generally represented by A, B, C, D, E, F, G & H. or a study on chemical groups and there realative trigram sequences.

This has only been tested with MySQL 4.0.11 Server and is ready to run now.

All you have to do to add to the database is first configure your settings for the database access. This will be in the settings Window from the Action menu.. You will require to install MyODBC to talk to the MySQL server.

If you do not have a database yet, make sure you have the permission to create tables and references, if so click on the button in the last page of the settings window called 'Create or Empty Database'. Once you have tested the connect and connected successfully this option will be enabled.

The database consist of mainly 2 byte smallints to store the Matrixs. But this is a great way to Share Layers and Keys for later use. Plus with MySQL you can connect over SSL so this is great for Key Population.

[1.8] - Browsing the Code

Remember if you are not just compiling this routine then there are a few things you should know. If you want to F8 debug the code you must specify the commandline command /debug . This will disable the menus that are created at runtime. Without doing this your compiler will crash.

last edited (February 26, 2004) by sroberts, Number of views: 2064, Current Rev: 5 (Diff)

[Edit this page]  [Page history]  [What links here]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.