Commit Graph

77 Commits

Author SHA1 Message Date
8c7bc52d9a
Fix error in prime_factors:
- Used number instead of num
	when the remaining value is a factor

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-10-19 19:56:57 +03:00
8f00e6a45a
Added prime_factors command
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-10-19 19:48:34 +03:00
b034158d2f
Added commands: genrand, genprime
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-10-19 18:23:01 +03:00
ec2bbf116b
Improved output:
- Print tested numbers as lines instead of
	using \r.
	- List command add more space for key name

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-10-19 18:08:35 +03:00
6d9e071aa4
Added is_prime command
- Usage: rsa <is_prime|is_prime_mr> <base> <N>

	Print if N is prime or not using traditainl method and
	Miller-Rabin method.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-10-19 18:04:44 +03:00
522e9f3453 Update cp right to 2021 2021-01-30 13:03:57 +03:00
5277984fdb Ignore venv dir 2021-01-30 13:00:48 +03:00
781cde431d
Copy right headers 2020-12-12 02:26:02 +03:00
75547aca2b
Merge branch 'master' of https://github.com/HeshamTB/hesham-rsa 2020-12-12 02:16:21 +03:00
HeshamTB
701ce1609d
Merge pull request #1 from HeshamTB/add-license-1
Create LICENSE
2020-12-12 02:17:29 +03:00
HeshamTB
68d613e4b5
Create LICENSE 2020-12-12 02:13:06 +03:00
9372246034 Update 'README.md' 2020-10-17 11:03:39 +03:00
4e41eb87f1
README typo 2020-09-10 09:54:53 +03:00
4d1d683d26 Update 'README.md' 2020-09-06 11:32:58 +03:00
b97b6b14f4 Merge pull request 'Block overwrite' (#6) from key-overwrite into master
Reviewed-on: https://apollo-server.ddns.net/gitea/Hesham/hesham-rsa/pulls/6
2020-09-06 09:06:28 +03:00
a864749812
key-overwrite: prompt overwrite choice. 2020-09-06 08:51:54 +03:00
825d8eb647
Block overwrite 2020-09-06 08:07:15 +03:00
f5eef6a226 Merge pull request 'term-output' (#4) from term-output into master
Reviewed-on: https://apollo-server.ddns.net/gitea/Hesham/hesham-rsa/pulls/4
2020-09-06 07:50:24 +03:00
66560b5f26
Merge branch 'master' into term-output 2020-09-06 07:42:01 +03:00
261ce0fdb4
version 1.2.2 2020-09-06 07:27:47 +03:00
b4e61d0a77
Updated interface 2020-09-06 07:26:49 +03:00
735b3bd71b
+x file mode 2020-09-06 06:17:52 +03:00
a36de9cf67
Better output while finding primes:
use \b instead of \r with the count of digits of tested number.
	still outputs a mess at start due to multithreads output at same time,
	however, stable after first itiration.
2020-09-06 06:13:19 +03:00
ea5a9195be
Check number of args in 'gen' command interface 2020-09-06 06:09:12 +03:00
d51a42589c
Use sys.exit() instead of exit():
exit() cuases stack trace output from pyinstaller exe.
	It is also recommended to use sys.exit() in prodcution.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-08-28 19:02:08 +03:00
b7597320fd
Ignore pyinstaller files 2020-08-28 18:53:22 +03:00
c059a7dccd
version 1.2.1
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-08-28 17:52:18 +03:00
7ae3e4dc04
Improved and accurate signature output
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-08-28 17:47:48 +03:00
c121314eb9 Update 'README.md' 2020-08-28 02:47:01 +03:00
45584d378e Update 'README.md' 2020-07-10 07:27:37 +03:00
18cf5b3059 Add 'README.md' 2020-07-10 07:25:20 +03:00
30069c3d2b
Print message for unknown sig.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-21 23:53:04 +03:00
9738da7dca
Merge branch 'master' of https://apollo-server.ddns.net/gitea/Hesham/hesham-rsa 2020-04-21 07:41:53 +03:00
bdb2fa7780
base-16 representation for all.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-21 07:40:31 +03:00
c351efa716
Print out n, e, d after key gen. 2020-04-20 21:20:34 +03:00
a474683f5e
Octet String to integer and integer to octet string.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-20 20:16:49 +03:00
f854c46dd2
update TODO 2020-04-20 02:49:48 +03:00
321fb3ec01
Added help command 2020-04-20 00:19:09 +03:00
23b421ee1f
print key command.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-19 20:26:05 +03:00
e086a2cdcc
Cracking keys function:
- Given n and e, try factoring n and
	generate d if p or q is found.
	works well with 16-bit to 64-bit keys.
	larger keys take vary long which is
	good.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-19 20:24:57 +03:00
bfdbca50e7
Simple Cracking. Vary inefficient.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-19 16:25:45 +03:00
e5a66e4d29
Cleanup:
- Interface exit codes
	- Clean up
2020-04-19 15:45:51 +03:00
611a6c45ea
Added Miller Rabin's algorithm:
- Now can generate a 4096-bit key in seconds.
	However, a longer key makes the cipher way too
	long. Should make a padding or an encoding to
	reduce the cipher size with big keys.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-18 22:49:06 +03:00
06793f5fb7
Updated list command output. 2020-04-18 17:53:12 +03:00
0d6bf9228d
Update TODO 2020-04-18 17:28:55 +03:00
8d2b822999
Fixed list output.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-18 17:18:58 +03:00
0cb6d56236
Added export key.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-18 15:23:06 +03:00
45c1abd0fa
Fixed output of listKeys().
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-18 14:12:46 +03:00
bfc572386e
Improved interface:
- Catch wrong number of args.
	- Logic was not correct.
	- Print command template.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-18 14:12:01 +03:00
998089f94c
Added list keys command.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2020-04-18 03:27:08 +03:00