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
# Attempts to demangle all mangled symbols in the current program using the Rust | |
# mangling schemes, and replace the default symbol and function signature | |
# (if applicable) with the demangled symbol. | |
# | |
# License: MIT OR Apache-2.0 | |
#@author Jack Grigg <thestr4d@gmail.com> | |
#@category Symbol | |
import string |
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
call plug#begin() | |
Plug 'drewtempelmeyer/palenight.vim' | |
Plug 'vim-airline/vim-airline' | |
Plug 'wlangstroth/vim-racket' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'rust-lang/rust.vim' | |
Plug 'preservim/tagbar' | |
Plug 'universal-ctags/ctags' | |
Plug 'luochen1990/rainbow' | |
Plug 'vim-syntastic/syntastic' |
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
ash@ly:~$ python3 | |
Python 3.8.5 (default, Jul 28 2020, 12:59:40) | |
[GCC 9.3.0] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from time import perf_counter | |
>>> lst = range(10_000) | |
>>> before = perf_counter(); _=[i for i in lst if i % 2]; perf_counter() - before | |
0.0010968240001147933 | |
## compare to JS |
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
def check_pohlig_hellman(curve, generator=None): | |
""" | |
The Pohlig-Hellman algorithm allows for quick (EC)DLP solving if the order of the curve is smooth, | |
i.e its order is a product of multiple (small) primes. | |
The best general purpose algorithm for finding a discrete logarithm is the Baby-step giant-step | |
algorithm, with a running time of O(sqrt(n)). | |
If the order of the curve (over a finite field) is smooth, we can however solve the (EC)DLP | |
algorithm by solving the (EC)DLP for all the prime powers that make up the order, then using the |