Coder Social home page Coder Social logo

s4lt5 / chromecac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cacbridge/chromecac

0.0 2.0 0.0 14.49 MB

A bridge between Google Chrome and CAC Authentication via Native Messaging

License: MIT License

JavaScript 15.53% C# 77.99% HTML 5.45% ASP 1.03%

chromecac's Introduction

ChromeCAC

ChromeCAC makes it easy and secure to sign data with smart cards using Google Chrome.

ChromeCAC is a work in progress, and is not yet ready for use!


ChromeCAC is made up of 3 parts:

  • the chrome extension
  • the native app that communicates with the chrome extension
  • the cacbridge.js website code

Setup

At this time, setup is heavily manual. Automatic installers will be created further into development.

Server-side Setup

Regular Webpage

<head>
...
<script src="cacbridge.js"></script>
...
</head>

NodeJS

Coming soon

RequireJS

require(['cacbridge'], function (CAC) {
  console.log(CAC)
})

Client-side Setup

Chrome Extension

In Google Chrome, go to Settings -> Extensions and click Load Unpacked Extension. Load the ChromeExtension folder.

In the loaded extension's information, copy for the ID.

Follow the manifest instructions for your OS here.

In the manifest, be sure to change chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ to chrome-extension://{ID}/

Native App

Build the native app of your choice, ex: ChromeCAC.NET

Place the built EXE in the location referenced from your manifest.

Usage

Sign a payload by calling CAC.sign(...)

CAC.sign("this string will be signed", function success (signatureInfo) {

  // Signed successfully
  // Passes signatureInfo, see below
  console.log("Signature: " + data.signature)

}, function fail () {

  // Failed to sign
  console.log("Failed to sign data!")

})

Interface

SignatureInfo

A JavaScript object containing information about the signed data. This is passed to the success callback in CAC.sign

Property Type Description
signature string The signature of the signed string
publicKey string The public key used to verify the certificate
fullSig string The full signature, containing the public key and signature to be easily verified

Verifying Signatures

Examples of signature verification are coming soon to CACBridge.

chromecac's People

Contributors

jkusner avatar mgallig avatar

Watchers

James Cloos avatar Salts 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.