This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Author: Jabari Zakiya, Original: 2009-12-25 | |
Revision-2: 2009-12-31 | |
Revision-3: 2010-6-2 | |
Revision-4: 2010-12-15 | |
Revision-5: 2011-5-11 | |
Revision-6: 2011-5-15 | |
Module 'Roots' provides two methods 'root' and 'roots' | |
which will find all the nth roots of real and complex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ ANS Forth implementation of Secure Hash Algorithm SHA-1 | |
\ FIPS 180-4 spec at: http://csrc.nist.gov/publications/PubsFIPS.html | |
\ Also HMAC for SHA-1 as specified in FIPS PUB 198-1 | |
\ Code accommodates Big and Little Endian, byte addressable CPUs. | |
\ | |
\ ------------ This implementation is for 32-bit systems ------------ | |
\ | |
\ DEPENDENCIES: CORE EXT WORDSET ; COMMON USAGE: ?DO CELL- | |
\ Use of this code is free subject to acknowledgment of copyright. | |
\ Copyright (c) 2001-2013 Jabari Zakiya - [email protected] 2013/1/15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ ANS Forth code for Secure Hash Algorithms SHA-256 and SHA-224 | |
\ FIPS 180-4 specs at: http://csrc.nist.gov/publications/PubsFIPS.html | |
\ Code accommodates Big and Little Endian, byte addressable CPUs. | |
\ | |
\ ------------ This implementation is for 32-bit systems ------------ | |
\ | |
\ DEPENDENCIES: CORE EXT WORDSET ; COMMON USAGE: ?DO CELL- | |
\ Use of this code is free subject to acknowledgment of copyright. | |
\ Copyright (c) 2001-2013 Jabari Zakiya - [email protected] 2013/1/15 | |
\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ ANS Forth code for 1024-bit block Secure Hash Algorithms | |
\ SHA-384, SHA-512, SHA-512/256, and SHA-512/224 | |
\ FIPS 180-4 specs at: http://csrc.nist.gov/publications/PubsFIPS.html | |
\ Code accommodates Big and Little Endian, byte addressable CPUs. | |
\ | |
\ ------------ This implementation is for 64-bit systems ------------ | |
\ | |
\ DEPENDENCIES: CORE EXT WORDSET ; COMMON USAGE: ?DO CELL- | |
\ Use of this code is free subject to acknowledgment of copyright. | |
\ Copyright (c) 2012-2013 Jabari Zakiya - [email protected] 2013-1-15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This C++ source file will compile to an executable program to | |
perform the Segmented Sieve of Zakiya (SSoZ) to find primes <= N. | |
It is based on the P5 Strictly Prime (SP) Prime Generator. | |
Prime Genrators have the form: mod*k + ri; ri -> {1,r1..mod-1} | |
The residues ri are integers coprime to mod, i.e. gcd(ri,mod) = 1 | |
For P5, mod = 2*3*5 = 30 and the number of residues are | |
rescnt = (2-1)(3-1)(5-1) = 8, which are {1,7,11,13,17,19,23,29}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This C++ source file will compile to an executable program to | |
perform the Segmented Sieve of Zakiya (SSoZ) to find primes <= N. | |
It is based on the P7 Strictly Prime (SP) Prime Generator. | |
Prime Genrators have the form: mod*k + ri; ri -> {1,r1..mod-1} | |
The residues ri are integers coprime to mod, i.e. gcd(ri,mod) = 1 | |
For P7, mod = 2*3*5*7 = 210 and the number of residues are | |
rescnt = (2-1)(3-1)(5-1)(7-1) = 48, which are {1,11,13,17..209}. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This C++ source file will compile to an executable program to | |
perform the Segmented Sieve of Zakiya (SSoZ) to find primes <= N. | |
It is based on the P7 Strictly Prime (SP) Prime Generator. | |
Prime Genrators have the form: mod*k + ri; ri -> {1,r1..mod-1} | |
The residues ri are integers coprime to mod, i.e. gcd(ri,mod) = 1 | |
For P7, mod = 2*3*5*7 = 210 and the number of residues are | |
rescnt = (2-1)(3-1)(5-1)(7-1) = 48, which are {1,11,13,17..209}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This C++ source file will compile to an executable program to | |
find the nth prime. It's foundation is the Sieve of Zakiya, and it | |
performs the Segmented Sieve of Zakiya (SSoZ) to find primes <= N. | |
This version is based on the P5 Strictly Prime (SP) Prime Generator. | |
Prime Genrators have the form: mod*k + ri; ri -> {1,r1..mod-1} | |
The residues ri are integers coprime to mod, i.e. gcd(ri,mod) = 1 | |
For P5, mod = 2*3*5 = 30 and the number of residues are | |
rescnt = (2-1)(3-1)(5-1) = 8, which are {1,7,11,13,17,19,23,29}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This C++ source file is a single threaded implementation to perform an | |
extremely fast Segmented Sieve of Zakiya (SSoZ) to find Twin Primes <= N. | |
It is based on the P5 Strictly Prime (SP) Prime Generator. | |
Prime Genrators have the form: mod*k + ri; ri -> {1,r1..mod-1} | |
The residues ri are integers coprime to mod, i.e. gcd(ri,mod) = 1 | |
For P5, mod = 2*3*5 = 30 and the number of residues are | |
rescnt = (2-1)(3-1)(5-1) = 8, which are {1,7,11,13,17,19,23,29}. | |
For just Twin Primes, use generator: Pn = 30*k + {11,13,17,19,29,31} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 [IF] AES Code Tutotorial | |
ANS FORTH code to implement the Advanced Encryption Standard (AES). | |
The National Institute of Standards and Technology (NIST) announced | |
on October 2, 2000 that Rijndael, created by Joan Daemen and Vincent | |
Rijmen, was selected as the AES algorithm to replace the old (since 1976) | |
Data Encryption Standard (DES). The formal AES specification is codified | |
in NIST (Federal Information Processing Standard) FIPS-197, url below: |
OlderNewer