semvec/pypi-packages huggingface dataset:
wsgidav-bcryptdc 0.1.0
A simple domain controller that stores passwords as bcrypt hashes.
Requires Python: >=3.6
Keywords: wsgidav

# wsgidav-bcryptdc

An implementation of the [wsgidav](https://wsgidav.readthedocs.io/en/latest/index.html) simple-dc that uses bcrypt hashes instead of plain text passwords.


## Installation

Install bcrypt dependency (requires rust to be present, if i'm not mistaken)
```shell
$ pip install wsgidav-bcryptdc
```

## Configuration

Configuration is basically the same as for the [simple-dc](https://wsgidav.readthedocs.io/en/latest/user_guide_configure.html#simpledomaincontroller), with the exception that it uses the `bcrypt_dc` config key, and a `password_hash` property is used instead of `password`.

```yaml
# NOTE: only HTTP basic auth is supported, make sure your communication to the wsgidav service is using SSL encryption
http_authenticator:
    domain_controller: wsgidavbcryptdc.SimpleBcryptDomainController
    accept_basic: true
    accept_digest: false
    default_to_digest: false

bcrypt_dc:
    user_mapping:
        '*': # default user mapping for all shares
            'username':
                password_hash: '$2y$05$u5fxm.Fb0sW64j6bFLFoKuTki0/ZSymNSlEBFR03SHngCZBA56XIS' # bcrypt hash for 'top-secret'
                roles: ['admin']
```
libsocket 1.31.0
A socket library that facilitates communication between python client and server.

# Libsocket
## Principle
The idea behind this library is to facilitate the communication between python clients and servers. It will automatically make the connection, and has the ability to send and receive messages and files. The connection can optionally be encrypted using XOR cypher. The XOR key is exchanged securely with an RSA keypair provided by the server. The encryption protocol is inspired by the SSH protocol, and described below.

## Encryption
### Client
The client will send a special request to the server to ask for its public key for asymmetric encryption. The client will wait for the response from the server, and store the key sent in response by the server.

The client will then generate a random symmetric encryption key (a XOR key seems simple and efficient to me). It will encrypt the generated symmetric key with the previously received server's public key, and send the encrypted key to the server.

The server will then store the symmetric encryption key, and use it to decrypt and encrypt the messages during the communication process.

The client will have the ability to encrypt and decrypt the messages using the XOR key previously generated. The client can choose if it wants to encrypt the messages, however, once the key has been sent to the server, all the messages sent by the server to the client will be encrypted.

### Server
The server will wait for a connection request. When a client will ask him for his previously generated public key, he will send it to the client, and wait for the sending of the symmetric key.

When it receives the symmetric key, it will save it and use it to encrypt all messages sent to the client. If a recived message is encrypted, it will be decrypted with this same key.