Giter Site home page Giter Site logo

demining / install-sagemath-in-google-colab Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 1.84 MB

Install SageMath in Google Colab

Home Page: https://cryptodeeptech.ru/install-sagemath-in-google-colab

JavaScript 63.41% CSS 36.59%
cryptanalysis cryptography sagemath bitcoin bitcoin-transaction cryptocurrency discrete-mathematics math mathematics sage

install-sagemath-in-google-colab's Introduction

Install SageMath in Google Colab



Install SageMath in Google Colab




In this article, we will do a fresh install SageMathin Google Colab. We previously published an article: “ Install SageMath for cryptanalysis on Fedora 64bit(10GB) Cloud Virtual Server ”, but in order to continue cryptanalysis of the Bitcoin blockchain, many of our readers prefer to use Debian and, Ubuntuin contrast to Fedora. As far as we know, Google Colab it has been updated to "Ubuntu 20.04.5 LTS".

We can check this by running the command:

!cat /etc/lsb-release

Install SageMath in Google Colab

Therefore "Ubuntu 20.04.5 LTS", the version allows us to install only SageMath version 9.0, Release Date: 2020-01-01

Using the standard install command:

!sudo apt-get install -y sagemath-common

Install SageMath in Google Colab

Unfortunately this version does not work properly.

For a complete cryptanalysis, we will install in Google Colab a completely new version SageMath version 9.3

File: Install_SageMath_in_Google_Colab.ipynb we published in GitHub

Let’s go to the official website: https://colab.research.google.com

Select the option “Upload notepad”


Install SageMath in Google Colab

Upload the file: Install_SageMath_in_Google_Colab.ipynb


Install SageMath in Google Colab

Now, through the utility, wget download tar-filesage-9.3-Ubuntu_20.04-x86_64.tar.bz2

!wget https://cryptodeeptech.ru/sage-9.3-Ubuntu_20.04-x86_64.tar.bz2
!tar -xf sage-9.3-Ubuntu_20.04-x86_64.tar.bz2

Install SageMath in Google Colab


Let’s go through the directory:

cd SageMath/

Install SageMath in Google Colab


Open the panel and go to the folder: SageMath


Install SageMath in Google Colab

Check if Python-script: relocate-once.py is there


Install SageMath in Google Colab


Run Python-script: relocate-once.py with the command:

!python3 relocate-once.py

Install SageMath in Google Colab


All is ready!

Now let’s run SageMath the command:

!./sage -sh

Install SageMath in Google Colab


Let’s run the version check command:

sage -v

Install SageMath in Google Colab


All right!

We’ve got a new version: SageMath version 9.3, Release Date: 2021-05-09


Implementing the Twist Attack algorithm , download   Python-script:discrete.py

wget https://raw.githubusercontent.com/demining/CryptoDeepTools/bbd83042e7405508cd2e646ad1b0819da0f9c58d/18TwistAttack/discrete.py

Install SageMath in Google Colab


To solve the discrete logarithm  (Pollard's rho algorithm for logarithms) run  Python-script:discrete.py

Now, to get the private key, we just need to run the command:

python3 discrete.py

Install SageMath in Google Colab


Sage Math 9.3  solve the discrete logarithm problem (Pollard's rho algorithm for logarithms)


Now everything is working properly!

We received the private key to the Bitcoin Wallet in decimal format, then for cryptanalysis we need to follow the instructions of the article dedicated to  Twist Attack


Source

Telegram: https://t.me/cryptodeeptech

Video: https://youtu.be/DBu0UnVe0ig

Source: https://cryptodeeptech.ru/install-sagemath-in-google-colab


Install SageMath in Google Colab

install-sagemath-in-google-colab's People

Contributors

demining avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

5l1v3r1

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.