Skip to content

Commit

Permalink
Merge pull request #110 from PradyumnaKrishna/0.3.0
Browse files Browse the repository at this point in the history
Version 0.3.0
  • Loading branch information
PradyumnaKrishna authored Jul 22, 2024
2 parents 20c89b7 + 0383477 commit c38ad48
Show file tree
Hide file tree
Showing 75 changed files with 4,723 additions and 13,571 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL='http://localhost:8000'
17 changes: 17 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-prettier/skip-formatting',
],
parserOptions: {
ecmaVersion: 'latest',
},
rules: {
'comma-dangle': ['error', 'always-multiline'],
},
}
9 changes: 2 additions & 7 deletions .github/workflows/client_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
paths:
- client/**

workflow_dispatch:

Expand All @@ -15,14 +13,11 @@ permissions:
id-token: write

concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false

jobs:
build:
defaults:
run:
working-directory: client
runs-on: ubuntu-latest
env:
VUE_APP_APIURL: ${{ secrets.VUE_APP_APIURL }}
Expand All @@ -42,7 +37,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./client/dist
path: ./dist

deploy:
environment:
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]

branches: ['main']

jobs:
analyze:
Expand All @@ -20,22 +19,21 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]


language: ['javascript']

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: '/language:${{matrix.language}}'
40 changes: 0 additions & 40 deletions .github/workflows/go_build.yml

This file was deleted.

113 changes: 0 additions & 113 deletions .github/workflows/python_build.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/run_eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
working-directory: ./client
run: npm ci

- name: Run linters
working-directory: ./client
run : npm run lint
run: npm run lint
33 changes: 19 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
.DS_Store
node_modules
/dist

# Python
__pycache__

# local env files
.env.local
.env.*.local
# env
.env

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*env

*.db
*.tsbuildinfo
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
37 changes: 37 additions & 0 deletions PROTOCOL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Enigma Protocol

**Date**: July 8, 2024
**Version**: 0.3.0

This document describes the protocol/algorithm for encrypting and decrypting messages, independent of how the keys are generated and the messages are transmitted. For message transmission, see the [Specification](SPECIFICATION.md).

## Overview

The protocol specifies the algorithm used for encrypting and decrypting messages.

## Motivation

Standard asymmetric encryption algorithms like RSA are slow and unsuitable for encrypting large messages. They also fail to encrypt messages larger than the key size. To overcome these limitations, the protocol uses a combination of symmetric and asymmetric encryption algorithms.

## Encryption

Encryption involves two different algorithms: symmetric and asymmetric encryption. Symmetric encryption is used to encrypt the message, and asymmetric encryption is used to encrypt the symmetric key, resulting in a fully encrypted message.

![Encryption](/images/encryption.png)

Steps to encrypt a message:

1. **Encrypting the Message**: Symmetric encryption must be used to encrypt the message. A unique symmetric key must be generated for each message and used to encrypt the message.
2. **Encrypting the Key**: Asymmetric encryption must be used to encrypt the symmetric key. The receiver's public key must be used to encrypt the symmetric key.
3. **Combining the Encrypted Key and Message**: The encrypted symmetric key and the encrypted message must be combined to form a complete encrypted message.

## Decryption

Decryption follows similar steps as encryption, but in reverse order. Asymmetric decryption is used to decrypt the symmetric key, and symmetric decryption is used to decrypt the message.

![Decryption](/images/decryption.png)

Steps to decrypt a message:

1. **Decrypting the Key**: Asymmetric decryption must be used to decrypt the symmetric key. The receiver's private key must be used to decrypt the symmetric key.
2. **Decrypting the Message**: Symmetric decryption must be used to decrypt the message. The symmetric key must be used to decrypt the message.
Loading

0 comments on commit c38ad48

Please sign in to comment.