GithubHelp home page GithubHelp logo

kingpoolee / rsa.principle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sfantree/rsa.principle

0.0 0.0 0.0 340 KB

RSA加密原理练习(采用aardio编写),参考pygmp2库的用法,手动封装gmp库(libgmp)实现大数运算。 后续会不定期更新,作为CTF RSA的解题工具

rsa.principle's Introduction

rsa.principle

介绍

RSA加密原理联系(采用aardio编写),参考pygmp2库的用法,手动封装gmp库(libgmp)实现大数运算。 后续会不定期更新,作为CTF RSA的解题工具

下载

参考release文件,也可下载aardio手动编译

封装的一些小疑问

封装gmp库参考的是math.bignum,其中aardio利用元表进行运算符重载

class bignum{
	ctor(num){
		this.bigNumber = ..raw.buffer(_buffSize);
		this@ = _meta;
	};
}

接着定义元属性

_meta = {
		_get = {
			add = function(n){
				var c = ..math.bignum();
				_dll.bignum_add(owner,..math.bignum(n),c)
				return c;
			};
...
}

实现重载方法

_add = function(b) {
    return owner.add(b);
};

其中位于_meta._get.add,若在利用对象使用owner(复制构造函数),则垃圾回收会崩溃

软件截图

image

rsa.principle's People

Contributors

popy32 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.