Skip to content

User's Guide & How it works

izi edited this page Aug 9, 2026 · 12 revisions

Intro

The cryptographic procedures are based on geometrical principles, the algorithms of which I've came up with and developed myself.

The mentioned geometrical point-converting mechanism provides a way to assign a single unique value to every point in an N-dimensional system. The resulting value depends on what base is used. Exceptions are points, of which only the X coordinate is non-zero and below half of the base used, e.g. point with coordinates (0,0,0,4) will serialize into "4" for all the bases above 7.

Similarly, each value has exactly one corresponding point in a given-dimensional coordinate system, of which the location depends on the base used in the conversion.


Glossary of Terms

Unify - Serialize many numbers (an N-dimensional point) into a single value, according to the base used.

Resolve - Partialize a value, given the number of dimensions and the base at which to vectorize. Backward operation for Unify.

Direct Convert - Refers to a composite operation, which is used in the provided encryption system. Performs both of the above operations using two different bases and the amount of dimensions provided.

Base - Also called "level", sometimes "key". An unsigned 64 bit integer. A number from 3 to 2^64, used in the above operations.

nDimensions - also called "nDims" or "nD" in the source code. Number of dimensions in the coordinate system, used by the above operations. Recommended values are below 300.


Button captions in GUI vs. function names

GUI term Library function name Description
Unify ToNumber Serializes the provided amount of numbers into a single number
Resolve ToPointND The reverse operation
Direct Convert DirectConvert Performs ToPointND(base1), then ToNumber(base2), with given arguments for nDimensions and the two bases
/// Encrypt/Decrypt Please see the description below the next section.

Available Functions

Usable functions in NumLab.js involve:

  1. ToNumber() returns a signed BigInt. Converts (combines/unifies/wraps) an array of signed _BigInt_s into one single BigInt. Usage example in index.html -> "Unify" button
  2. ToPointND() is the reverse operation. It resolves (vectorizes/unwraps/decomposes) one signed BigInt into several signed BigInts. Example in index.html -> "Resolve" button
  3. DirectConvert() performs ToPointND() on a signed BigInt, then ToNumber() n the resulting array, based on given two "levels" (or bases/keys) and the number of dimensions. Example in index.html -> "Direct Convert" button
  4. DirectConvertArray8 which performs the actual encryption and decryption of a byte array. Used in uncrunchable.js.
  5. DirectConvertArray32 performs the actual encryption on an Uint32Array ignoring the elements with value 0 at the end. Used in uncrunchable.js.

uncrunchable.js exposes two functions:

  1. Encrypt() converts a byte array or an 'Uint32Array' into a BigInt, then performs DirectConvert(). Described and used in TestCrypt.html.
  2. Decrypt() is the same operation, but with exchanged "levels".

Limitations

  • Since byte arrays are treated as numbers, leading zero-bytes cannot be "recognized", resulting in the following adjustment that I made: If the byte array finishes with zero-bytes, these zero-bytes will be copied to the end of the resulting byte array. If you don't want the zero-bytes at the end of array exposed, you should handle the array accordingly, prior to encryption.

  • For the "nDimensions" argument, please use values below 300, otherwise it may result in a prolonged processing of the encryption of larger byte arrays.

Clone this wiki locally