Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
/ shield.cr Public archive

⚠️ Unavailable - Crystal Concept Password Generator

License

Notifications You must be signed in to change notification settings

636f7079/shield.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shield.cr - Concept Password Generator

Description

  • This is the first tool I made while learning the Crystal language. ( ≈ 1 year ago )
    • This is very different from my current idea, I will rewrite it in the future.
      • Use Base64 stream instead of offset (English uppercase / lowercase).
      • Better structure, clear syntax, ...
  • In the future, once I have free time, I may rewrite it using Rust, and port to WebAssembly.
  • Due to the need to maintain other Crystal repositories, this project will be temporarily put on hold.
    • Currently, this repository is non-first priority, 2020-03-29 16:38:37.932649000 UTC.

Summary

  • Use multiple Cryptographic hash function.
  • Based on the Char (Unicode) offset character.
  • Slide to adjust the secret key length.
  • Confound the results of password.
  • Create an indestructible password.
  • create more (e.g. email, user_name, pin).
  • Shield generates One-way security password.
  • Shield.cr will never save any data.

Features

  • Specify the Number of Iterations.
  • Specify the Length of SecretKey (Between 10 to 99).
  • Create Email / UserName / PIN Code.
  • Sliding to Create Secret Key.
  • Enable / Disable the Secret Key symbol Feature.

RoadMap

  • More Code Comments to be added.
  • More Spec Tests to be added.
  • More Wiki Information to be added.
  • Shield CLI Password Vault (Shadow.cr).
  • Shield.cr Windows / iOS Support.
  • ...

IdWithKey

How does it work?

  • SecureId
    • UUID-Sha384
  • SecretKey
    • (sha512WithRSAEncryption + HMAC + (Pbkdf2HMAC * 32)) * iterations

SecureId

  • _id_: OpenSSL#Digest
    • Digest(data: titleName, "sha384")
    • left, right = getCenter
    • [left..right] -> UUID -> UpCase

SecretKey

  • _rsa_: OpenSSL#Digest
    • Digest(data: key, algorithm: sha512WithRSAEncryption) + : + SecureId
    • Slide
  • _hmac: OpenSSL#HMAC
    • SecureId + : + HMAC(data: _rsa_, key: Crc32(_rsa_).reverse)
  • pbkdf: OpenSSL#PKCS5#Pbkdf2HMAC
    • Pbkdf2HMAC(secret: _hmac, salt: _rsa_, iterations: 2 ** 5, algorithm: SHA512)
    • Slide
  • _key_: Shield#Character#obfuscate
    • Obfuscate(pbkdf[PbkdfSlider.left..PbkdfSlider.right].reverse)
    • ...
  • IterativeKey(iterations) -> Done -> yield done?, _key_.

Use Shield

Used as Shard

Add this to your application's shard.yml:

dependencies:
  shield:
    github: 636f7374/shield.cr

Installation

$ git clone https://github.com/636f7374/shield.cr.git
$ cd shield.cr && make build && make install

Development

$ make test

Credit

Contributors

Name Creator Maintainer Contributor
636f7374
delef

License

  • MIT License