Git Product home page Git Product logo

certificationservice's Introduction

Certification Service for Python

Motivation

This Service was developing in order to overtake some limitations of the Security Libraries for Python. The M2Crypto library consists on a Python wrapper for OpenSSL featuring X509, RSA, among other features. However, the majority of the Cryptographic libraries for python, such as this library, are not fully supported by Python3. Therefore, the developed service uses Pyro4 in order to allow Remote Objects (running in python2) to be used in python3 applications. In addition, this service also consists on an abstraction layer for the complex, as well as not properly documented, M2Crypto library.

This repository also contains the mentioned Remote Objects in traditional modules, which can be imported like the usual python modules.

Service Structure

This service is composed by two different remote objects. A module for a Certification Authority(CA), as well as a module for Certification Subjects (CS). The CA needs a self-signed certificate, as well as a Private Key. Moreover, the CS needs the CA certificate, as well as a RSA Key pair.

It is important to refer that the certificates and keys mentioned should be generated using OpenSSL.

Dependencies

The Certification services and modules have the following dependencies:

Python 2.7
M2Crypto
OpenSSL
Pyro4

The test examples have the following dependencies:

Python 2.7 or Python 3
Pyro4

Generating OpenSSL Certificate and Key Pairs

Considering the Certification Authority, the following command should be executed:

$ openssl req -x509 -newkey rsa:2048 -keyout ca_priv.pem -out ca_cert.pem

Considering the Certification Subject, the following commands should be executed:

$ openssl genrsa -aes128 -passout pass:dioti -out peer_priv.pem 2048
$ openssl rsa -in peer_priv.pem -passin pass:dioti -pubout -out peer_cert.pem

Example for Traditional Module

Considering the python script testModule, it is necessary to execute the following command:

python2.7 testModule.py

Example for Remote Objects Service

Considering the python script testService, it is necessary to execute the following commands:

pyro4-ns
python2.7 certRemoteObjects/CertAuthoritpy
python2.7 certRemoteObjects/CertSubject.py
python testService.py

certificationservice's People

Contributors

vasco-santos avatar

Stargazers

 avatar

Watchers

 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.