Вся суть харча™ (на самом деле все далеко не так...)
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 |
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
" plugins | |
let need_to_install_plugins = 0 | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
let need_to_install_plugins = 1 | |
endif | |
call plug#begin() | |
Plug 'tpope/vim-sensible' |
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
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'scrooloose/nerdtree' | |
"Plug 'tsony-tsonev/nerdtree-git-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'airblade/vim-gitgutter' |