<commit_before>lokun-record
=======

This is `record`. It gets it's name as it is the "book-keeper" for
[Lokun](https://lokun.is). It does a lot of things; authorizes or denies users access
to VPN servers, recieves payments, holds the little customer data we have (no other
information is stored by us about our users).

![Lokun](logo.png)

We believe in free software and thus `record` is licensed as AGPL. 

Python packages needed
---------------------
 * `json`
 * `sqlite3`
 * `bottle`
 * `BeautifulSoup`
 * `quopri`
 * `pycrypto`
 * `webtest`
 * `netaddr`

Dependencies from apt:
-----------------------------
 * `python`
 * `python-pip`
 * `nsis`
 * `openssl` 
 * `python-dev`
 * `build-essentials`

DalPay crypto protocol
======

This protocol follows the Encrypt-Then-MAC principle and the main objective 
for implementing this protocol is to prevent disclosure of the username to
DalPay (or any other payment processor for that matter), since DalPay have 
the name, address and card number of a customer. 

When a user initiates a DalPay transaction, a message is placed in the `user1` 
parameter sent to dalpay from `www.lokun.is`. This parameter is then included 
in the callback that is sent to api.lokun.is. The message follows the following
 protocol:

     AES_ENCRYPT(Base64("Username$Nonce"), key) $ Nonce $ IV $ HMAC


The password from DalPay is compared, as it is the only provided mechanism
to be sure the message orignated from DalPay. This protocol does nothing to 
prevent false replay messages from a user. Thus, it does not protect Lokun from
a user potentially scamming a free VPN connection, but it protects users from
DalPay, if they were served an injunction. 

Maintainers 
====
<commit_msg>other parts to readme<commit_after>lokun-record
=======

This is `record`. It gets it's name as it is the "book-keeper" for
[Lokun](https://lokun.is). It does a lot of things; authorizes or denies users access
to VPN servers, recieves payments, holds the little customer data we have (no other
information is stored by us about our users).

![Lokun](logo.png)

We believe in free software and thus `record` is licensed as AGPL. 

Python packages needed
---------------------
 * `json`
 * `sqlite3`
 * `bottle`
 * `BeautifulSoup`
 * `quopri`
 * `pycrypto`
 * `webtest`
 * `netaddr`

Dependencies from apt:
-----------------------------
 * `python`
 * `python-pip`
 * `nsis`
 * `openssl` 
 * `python-dev`
 * `build-essentials`

DalPay crypto protocol
======

This protocol follows the Encrypt-Then-MAC principle and the main objective 
for implementing this protocol is to prevent disclosure of the username to
DalPay (or any other payment processor for that matter), since DalPay have 
the name, address and card number of a customer. 

When a user initiates a DalPay transaction, a message is placed in the `user1` 
parameter sent to dalpay from `www.lokun.is`. This parameter is then included 
in the callback that is sent to api.lokun.is. The message follows the following
 protocol:

     AES_ENCRYPT(Base64("Username$Nonce"), key) $ Nonce $ IV $ HMAC


The password from DalPay is compared, as it is the only provided mechanism
to be sure the message orignated from DalPay. This protocol does nothing to 
prevent false replay messages from a user. Thus, it does not protect Lokun from
a user potentially scamming a free VPN connection, but it protects users from
DalPay, if they were served an injunction. 

Other parts
===

Do note that this project depends on other parts of Lokun that are not included
on github. These are `keycontrol` and `reikningar`. 

Maintainers 
====

{'fraction_non_alphanumeric': 0.10519011934499028, 'fraction_numerical': 0.0022203719122953097, 'mean_word_length': 3.6443298969072164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '275444', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1011, 'n_words': 491}