Skip to content

minhtriet359/CryptoServiceAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crytography Services Restful API

A restful API that provides cryptographic services such as: symmetric encryption and decryption, asymmetric encryption and decryption, hashing data, digitally signing data, digital signature verification, key storing and retrieving

The purpose of the project is to learn and practice concepts:

  • Building a RESTful API.
  • Strengthening knowledge on crypto services
  • MVC Architectural Pattern.

Following technologies and framework were used:

  • Flask framework, flask blueprints pattern
  • Flask-JWT- Extended for user authentication
  • PyCrypto Library for encryption (AES,RSA), hashing(SHA256) and digital signatures(PKCS1)
  • Werkzeug Web Server Gateway Interface
  • SQLite relational database used as backend database
  • HTTP (GET, POST, PUT, PATCH, DELETE, status codes)
  • Postman for testing endpoints

API Endpoints:

API endpoints

Sample Endpoints from Postman:

  • Generate symmetric key: getkey
  • Generate asymmetric key: getkey_asymmetric
  • Symmetric Encryption: encrypt_symmetric
  • Symmetric Decryption: decrypt_symmetric
  • Sign and verify signature: signature signature_verified
  • User Register and Login: (Note: Succesful login will generate a token) user_register user_login
  • Store and retreive keys (Note: Token is required for authorization) token_required store_key get_key_from_storage

To activate virtual env on AWS for update:

source venv/bin/activate

Restart API:

pkill gunicorn gunicorn --bind 0.0.0.0:5000 main:app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published