|
HIME
contains the following functions. Functions marked as
NEW!
are new in the latest HIME version :
Basic math functions
hi_Add : Add 2 huge integers
hi_Decr : Decrement huge integer in register with one
hi_Div : Divide 2 huge integers. Returns quotient and remainder
hi_DivBy2 : Divide a huge integer by 2
hi_ExtEuclidAlgo: Perform the Extended Euclidean Algorithm
hi_GCD : Calculate the greatest common divisor of 2 huge integers
hi_Incr : Increment huge integer in register with one
hi_Mod : Modulo operation: h1 mod h2 (remainder of
division)
hi_ModInv : Modulo of inverse huge integer: h1^-1 mod h2
hi_Mul : Multiply 2 huge integers
hi_MulBy2 : Multiply a huge integer by 2
hi_Pow : Raise h1 to the power of h2: h1^h2
hi_PowMod : h1^h2 mod h3
hi_Root_N :
Calculate the Nth root of a
huge integer number, and the remainder in case h1 is not a perfect power
hi_Root_Sqrt :
Calculate the square root of
a huge integer number, and the remainder in case h1 is not a perfect square
hi_Square : Square a huge integer
hi_Sub : Subtract 2 huge integers
Bit manipulation functions
hi_And :
Perform a bitwise AND
operation on 2 operands
hi_BitClear :
Clear a specified bit in a
register operand
hi_BitSet :
Set a specified bit in a
register operand
hi_BitToggle :
Toggle a specified bit in a
register operand
hi_Not :
Perform a bitwise NOT operation
on an operand
hi_Or :
Perform a bitwise OR operation
on 2 operands
hi_Xor :
Perform a bitwise XOR
operation on 2 operands
Boolean functions
hi_IsBitSet : Test the value of a specified bit
hi_IsEqual : Test if 2 huge
integers are equal
hi_IsLess : Test if 1 huge integer is less (smaller) than the
other
hi_IsNotEqual : Test if 2 huge integers are not equal
hi_IsOdd : Test if a huge integer is odd
hi_IsZero : Test if a huge integer is zero
hi_IsRegAllocated
: Test if specified register is allocated or not
Register functions
A register is a HIME internal variable, used to exchange
data with HIME.
hi_CopyReg : Copy one register to another register
hi_FormatAsHuge :
Make datalength a multiple
of 4 bytes, according to the huge integer format
hi_GetReg : Get the contents of a register and store it in a
string
hi_GetRegAdd : Get the contents of a register. Return memory address and
number of bytes
hi_GetRegAdd2 : Get the contents of a register. Store register contents at
specified address
hi_GetRegAsciiz1 : Get an asciiz string from a register, method 1
hi_GetRegAsciiz2 : Get an asciiz string from a register, method 2
hi_GetRegByte : Get a single byte from a register (with index)
hi_GetRegDword :
Get 4 bytes from a register
as a dword variable (32 bits unsigned integer)
hi_GetRegLong :
Get 4 bytes from a register
as a long variable (32 bits signed integer)
hi_GetRegToClipboard : Get data from a register and store in clipboard
hi_GetRegToFile : Get data from a register and store it in a file
hi_PutReg : Put dynamic string data in a register
hi_PutRegAdd : Put data in a register. Data defined
hi_PutRegAsciiz : Put an asciiz string into a
register
hi_PutRegDword
:
Store a dword value (32 bits
unsigned integer) into a HIME register
hi_PutRegFromClipboard : Get data from the clipboard and store in a register
hi_PutRegFromFile : Put data in a register. The data
is retrieved from a file
hi_PutRegLong
:
Store a long value (32 bits
signed integer) into a HIME register
hi_Rec_AddField
: Add a field to a 'record'. A record is a HIME register with a
special format.
hi_Rec_GetField
: Retrieve a field from a 'record'. A record is a HIME register with
a special format.
hi_Rec_GetNrFields : Get the number of fields that are stored in a record.
hi_RegAllocate
: Allocate a HIME register and return the register number.
hi_RegAllocateMultiple : Allocate multiple HIME registers
hi_RegAllocateRange : Allocate a range of HIME registers.
hi_RegChangeEndian
: Change endianness of the contents of the specified register
hi_RegClear : Clear contents of register
hi_RegCompare
: Compare the value of 2 huge integer registers
hi_RegConcatByte : Concatenate a byte to a register
hi_RegConcatReg : Concatenate a register to a register
hi_RegGetLen : Get length of register data
hi_RegMaxAllocated
: Get the maximum number of registers that was allocated during a
session.
hi_RegReverse : Reverse the contents of the specified register
hi_RegSplit
: Split the contents of a register in 2 parts: a left and a right
part
hi_RegUnAllocate
: Unallocate a HIME register that was previously allocated.
hi_RegUnAllocateRange : Unallocate a range of HIME registers.
hi_SwapReg : Swap contents of 2 registers
Encryption/Decryption functions
hi_Decrypt_AES_1Block : Decrypt ciphertext into plaintext with the AES symmetric key
algorithm
hi_Decrypt_AES_ECB : Decrypt ciphertext into plaintext with the AES symmetric key
algorithm in ECB mode
hi_Decrypt_AES_CBC : Decrypt ciphertext into plaintext with the AES symmetric key
algorithm in CBC mode
hi_Decrypt_Arc4 : Decrypt ciphertext into plaintext with the ArcFour (RC4) encryption
algorithm
hi_Decrypt_RSA
: Decrypt ciphertext into plaintext with the RSA assymmetric key
algorithm
hi_Decrypt_RSA_CRT
: Decrypt ciphertext into plaintext with the RSA-CRT assymmetric key
algorithm
hi_Encrypt_AES_1Block : Encrypt 1 block of plaintext into ciphertext with the AES
symmetric key algorithm
hi_Encrypt_AES_ECB
:
Encrypt plaintext into ciphertext with the AES symmetric key
algorithm in ECB mode
hi_Encrypt_AES_CBC : Encrypt plaintext into ciphertext with the AES symmetric key
algorithm in CBC mode
hi_Encrypt_Arc4 : Encrypt plaintext into ciphertext with the ArcFour (RC4) encryption
algorithm
hi_Encrypt_RSA
: Encrypt plaintext into ciphertext with the RSA asymmetric key
algorithm
hi_GenerateRSAKeys
: Generate a keypair (private, public key and modulus) for the RSA algorithm
hi_GenerateRSAKeys_CRT:
Generate a keypair (private, public key and modulus) for the RSA-CRT
(Chinese Remainder Theorem) algorithm
hi_RSA_Pad_PKCS1_1_5
: Increase the RSA plaintext
security by padding it according PKCS#1 v1.5
hi_RSA_Unpad_PKCS1_1_5: Remove padding to retrieve
the original plaintext after RSA decryption
Diffie-Hellman key exchange functions
hi_DH_GenParams :
Generates the two parameters P and
G to be used in the Diffie-Hellman key exchange algorithm
hi_DH_Step1 :
Generates the users public key, and
an optional private key
hi_DH_Step2 :
Generates the shared key
Hash functions
hi_Hash_CRC32
: Calculate the CRC32 hashvalue (checksum) of a string
hi_Hash_MD5
: Calculate the MD5 hashvalue of a string
hi_Hash_SHA_1
: Perform
the SHA-1 secure hash algorithm
hi_Hash_SHA_256
: Perform
the SHA-256 secure hash algorithm
hi_Hash_SHA_512
: Perform
the SHA-512 secure hash algorithm
hi_HMAC_FIPS198
: Calculates a HMAC
according to NIST FIPS 198
Random number functions
hi_GenerateBBSRandomBits : Generate a number of random bytes with the Blum-Blum-Shub
algorithm
hi_GenerateRandom : Generate a number of random bytes
hi_GenerateRSAKeys : Generate a keypair (private, public key and modulus) for
the RSA algorithm
hi_GenerateRSARandomBits : Generate a number of random bytes with the RSA algorithm
hi_GetRandomBytesFromServer :
Get true random bytes from an internet server
hi_InitBBS : Calculate parameters for 'hi_GenerateBBSRandomBits'
Prime
number and factoring functions
hi_Factor_Pollards_Rho:
Find a factor of a
huge integer number by implementing Pollard's Rho algorithm
hi_Factor_TrialDiv
:
Find a factor of a
huge integer by dividing it by prime numbers
hi_Factors
:
Find all factors
of a given huge integer number
hi_GeneratePrime : Generate a huge integer prime number of required bit length
hi_GetPrimeFromTable :
Get prime number
from the lower primes internal table
hi_IsPrime_Div : Test if huge integer is prime by dividing by lower prime
numbers
hi_IsPrime_F : Test if huge integer is prime by using Fermats little
theorem
hi_IsPrime_RB : Test if huge integer is prime by using the Rabin-Miller
test
hi_IsPrime_Slow : Test if huge integer is prime (slow but 100% sure
algorithm)
hi_IsRelPrime : Test if 2 huge integers are relative prime (have no common
factors)
hi_ReadPrimes : Initialize the table with lower primes for use by
hi_GeneratePrime and hi_IsPrime_Div
Data conversion functions
hi_Base642Huge :
Convert a string in Base64 format
to a huge variable
hi_Bin2Huge : Convert binary ascii string to huge
integer
hi_BreakString :
Format an (ascii) string for display purposes
hi_Dec2Huge : Convert decimal ascii string to huge integer
hi_Hex2Huge : Convert hex (ascii) string to huge binary variable
hi_Huge2Base64 : Convert huge variable to a string in Base64 format
hi_Huge2Bin : Convert huge integer to binary ascii string
hi_Huge2Dec : Convert huge integer to decimal ascii string
hi_Huge2Hex : Convert huge integer to hexadecimal ascii string
hi_TrimLZeroes : Remove leading zeroes in an ascii string
Compression functions
hi_Compress :
Compress data (with 5 possible
compression algorithms)
hi_Decompress :
Decompress data
Data security
functions
hi_RegWipe : 'Burn' a register, i.e. overwrite it with random data before
clearing it.
hi_ShredDisk :
Securely delete the free space of a
disk.
hi_ShredFile :
Securely delete a file by overwriting
its data with various patterns.
hi_StackWipe : Wipes (overwrites) the currently unused part of the
stack to remove any traces of 'old' data.
Miscellaneous functions
hi_CheckTestVectors_AES : Test the AES routines
hi_CheckTestVectors_Arc4 : Run some test
vectors on the ArcFour (RC4) algorithm
hi_CheckTestVectors_HMAC_FIPS198:
Run some test
vectors on the ArcFour (RC4) algorithm
hi_CheckTestVectors_MD5 : Check proper functioning of HIMEs MD5 function
hi_CheckTestVectors_SHA_1
: Test the SHA-1 routines
hi_CheckTestVectors_SHA_256 : Test the SHA-256 routines
hi_CheckTestVectors_SHA_512 : Test the SHA-512 routines
hi_GetGlobalError : Get global error value
hi_GetOption
:
Get the value of a HIME option
hi_HIMEParams_LoadFromFile :
NEW!
Function to make HIME start up faster
hi_HIMEParams_SaveToFile :
NEW! Save HIME internal parameters to file for faster startup
hi_Register : Register HIME
hi_SetOption
: Set a HIME option
hi_Version : Get versionnumber of HIME

|