botan

ShadowSocks-Qt5 for arm64(鲲鹏、飞腾)

♀尐吖头ヾ 提交于 2020-08-13 23:18:16
操作系统:Ubuntu Kylin 优麒麟 20.04 LTS 适用平台:arm64 一、安装包 软件仓库中没有 ShadowSocks-Qt5 (简称:SS)的安装包,而且目前该项目处于停止更新的状态,因此需要下载一些“陈旧”的安装包。 1.1 Botan 请使用Debian仓库中的 2.9 版本,Ubuntu 仓库中的 2.12 与 SS 存在兼容性问题。 请从下方链接下载 botan 和 libbotan-2-9,如果想自行编译,还需要下载 libbotan-2-dev。架构选择arm64,镜像站选择亚洲的,速度快一些。 https://packages.debian.org/search?suite=buster&searchon=names&keywords=botan 安装下载好的软件包。 sudo dpkg -i *botan*.deb 1.2 ShadowSocks 请从下方链接下载 shadowsocks-qt5 和 libqtshadowsocks2,如果想使用非图形化的工具,请下载 shadowsocks。 https://packages.debian.org/search?keywords=shadowsocks&searchon=names&suite=stable&section=all 安装下载好的软件包。 sudo dpkg -i

RSA遇上中国剩余定理

南笙酒味 提交于 2020-08-05 04:41:16
1.Introduction 最近读论文刚好用到了这个,之前只是有耳闻,没有仔细研究过,这里就好好捋一下,会逐步完善 不过貌似CRT(中国剩余定理)的实现更容易被攻击 2. RSA: Overview rsa算法描述如下: 选择两个大素数 \(p、q\) ,计算 \(N = p*q\) (最好保证N在2048bit以上,最新的研究工作已经可以成功分解762bit的N) 计算 \(\phi(N)=(p-1)*(q-1)\) 选择一个 \(e\) 使得 \(gcd(e, \phi(n)) == 1\) ,e由于是作加密使用,故推荐使用小值,推荐使用3、65537( \(2^{16}+1\) ),65537只有两个1bit,所以在幂运算(参加我的另一篇博客: 快速指数算法 )时只需要两次额外的乘法运算;此外,不需要担心使用固定值会造成的安全问题,RSA的安全性不会受影响 计算 \(ed = 1 (\mod\phi(n))\) ,得到 \(d\) 值用于解密 公钥:(N, e),私钥:(N, d) 一次RSA加解密: \[c = m^e \mod N\\ m = d^d \mod N\\ \] 解释: 即 \(m = (m^e)^d = m^{1\mod\phi(N)}=m^{h*\phi(N)+1}\mod N\) , 由欧拉定理 \(a^{\phi(n)}=1 \mod n\)

How do I solve the issue “No module name Botan”

别来无恙 提交于 2019-12-20 01:59:07
问题 I am using windows 8 and python 3.6.1 I've done the following command in my cmd: pip install cryptoshop However, when I run the following python code: from cryptoshop import encryptfile from cryptoshop import decryptfile result1 = encryptfile(filename="test", passphrase="mypassphrase", algo="srp") print(result1) result2 = decryptfile(filename="test.cryptoshop", passphrase="mypassphrase") print(result2) I get the following error: Traceback (most recent call last): File "C:/Users/Owner/Desktop

“Undefined reference” when accessing my shared library using JNI

有些话、适合烂在心里 提交于 2019-12-18 18:21:32
问题 I'm trying to build a version of Botan (library for cryptographic algorithms) using JNI to run a few native C++ programmes on Android. I've managed to create a libbotan.so without any errors using the NDK tool chain (NDK R5b). But when I'm compiling my source file (exampleError.cpp) from my Android project (Example) I get the following errors: Android NDK: WARNING: Unsupported source file extensions in /home/fensta/workspace /Example/jni/Android.mk for module botan Android NDK: sources

Build Botan library for Android

烈酒焚心 提交于 2019-12-12 21:27:40
问题 How can I build the cryptographic library Botan for Android? I am using M ac OS 10.7 and Eclipse IDE . 回答1: Please, have a look at http://marc.info/?l=botan-devel&m=132094503031485. There it is described what the botan_all.cpp/ botan_all.h are and how they can be generated. Essentially, they contain all the functions of the Botan library in one file. They can be created by running: ./configure.py --cpu=arm --gen-amalgamation In the next step you adjust your settings of the Android.mk

How to use Botan Amalgamation files and VS2008

倾然丶 夕夏残阳落幕 提交于 2019-12-08 13:37:14
问题 Clean install of Windows XP SP3 Install Python 2.7.2 Extract Botan 1.10.1 to the desktop Run configure.py --cc=msvc --disable-shared --gen-amalgamation Copy botan_all.h and botan_all.cpp to my dev workstation Make a new project Win32 console project in VS2008 This gives me 102 errors ... anyone using this library? #include "botan_all.h" int main(int argc, char *argv[]) { return 0; } 回答1: The problem is your project is a windows application and includes windows.h, windows.h includes macros for

Error while compiling botan sample example in Qt

一曲冷凌霜 提交于 2019-12-07 22:32:57
问题 I am trying to find out the error for two days but still haven't got this unknown reason figure out. I have configured and compiled Botan library. Everything goes ok but when try to write this sample code to be run.. S2K* s2k = get_s2k("PBKDF2(SHA-256)"); s2k->set_iterations(4049); SecureVector<byte> key_and_IV = s2k->derive_key(48, passphrase).bits_of(); SymmetricKey key(key_and_IV, 32); it says error: 'class Botan::PBKDF' has no member named 'set_iterations' How can I solve this problem ?

How do I solve the issue “No module name Botan”

前提是你 提交于 2019-12-01 21:22:36
I am using windows 8 and python 3.6.1 I've done the following command in my cmd: pip install cryptoshop However, when I run the following python code: from cryptoshop import encryptfile from cryptoshop import decryptfile result1 = encryptfile(filename="test", passphrase="mypassphrase", algo="srp") print(result1) result2 = decryptfile(filename="test.cryptoshop", passphrase="mypassphrase") print(result2) I get the following error: Traceback (most recent call last): File "C:/Users/Owner/Desktop/test.py", line 1, in from cryptoshop import encryptfile File "C:\Users\Owner\AppData\Local\Programs

swprintf and vswprintf not declared?

烂漫一生 提交于 2019-11-28 07:16:28
问题 I am trying to compile Botan on Windows with MinGW, and am receiving the following error during compilation: c:\qt\2010.04\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error: '::swprintf' has not been declared c:\qt\2010.04\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:166: error: '::vswprintf' has not been declared Why are swprintf and vswprintf not declared, and how can I fix this? 回答1: Try putting in #undef __STRICT_ANSI__ before including stdio.h 回答2: had the same