A blazing-fast, ephemeral secret sharing service built with Go. Share sensitive information securely with military-grade encryption that self-destructs after viewing.
- π Military-Grade Encryption - AES-256-GCM ensures confidentiality, integrity, and authenticity
- β±οΈ Self-Destructing Secrets - Set view limits and watch secrets vanish after access
- π Text & File Support - Share passwords, API keys, documents, or any sensitive files
- π Lightning Fast - Built with Go for maximum performance
- βοΈ Multi-Cloud Support - Choose between AWS (DynamoDB/S3) or Google Cloud (Firestore/GCS)
- π Zero-Knowledge - Server never sees unencrypted data
- π― Simple API - RESTful endpoints for easy integration
- π¨ Clean Web UI - Beautiful interface for non-technical users
- π‘οΈ Scrypt KDF - Hardware-resistant key derivation prevents brute force attacks
# Pull and run with AWS backend
docker run -d \
--name secure_secret_share \
-p 8080:8080 \
-e DYNAMO_TABLE=secrets \
-e S3_BUCKET=encrypted-files \
-e AWS_REGION=us-east-1 \
secure_secret_share:latest
# Or with Google Cloud backend
docker run -d \
--name secure_secret_share \
-p 8080:8080 \
-e GCP_PROJECT_ID=your-project \
-e FIRESTORE_DATABASE=secrets-db \
-e GCS_BUCKET=encrypted-files \
secure_secret_share:latest# Clone the repository
git clone https://github.com/nckslvrmn/secure_secret_share.git
cd secure_secret_share
# Build the Docker image
docker build -t secure_secret_share .
# Or build locally
go build -o secure_secret_share main.goChoose your cloud provider by configuring the appropriate variables:
| Variable | Required | Description |
|---|---|---|
DYNAMO_TABLE |
β | DynamoDB table name for storing encrypted secrets |
S3_BUCKET |
β | S3 bucket name for storing encrypted files |
AWS_REGION |
βͺ | AWS region (default: us-east-1) |
| Variable | Required | Description |
|---|---|---|
GCP_PROJECT_ID |
β | Google Cloud project ID |
FIRESTORE_DATABASE |
β | Firestore database name |
GCS_BUCKET |
β | Cloud Storage bucket name |
Note: Configure either AWS or Google Cloud variables, not both!
Choose one of these methods:
- IAM Role (Recommended for EC2/ECS)
- Environment Variables:
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY - AWS Profile: Set
AWS_PROFILE - Default Credential Chain: Automatically tries all methods
Required IAM permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:PutItem",
"dynamodb:GetItem",
"dynamodb:DeleteItem",
"dynamodb:UpdateItem"
],
"Resource": "arn:aws:dynamodb:*:*:table/YOUR_TABLE_NAME"
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
}
]
}- Service Account (Recommended): Set
GOOGLE_APPLICATION_CREDENTIALSto your key file path - Application Default Credentials: Automatic in GCP environments
Required roles:
- Firestore:
roles/datastore.user - Cloud Storage:
roles/storage.objectAdmin
curl -X POST https://your-domain/encrypt \
-H "Content-Type: application/json" \
-d '{
"secret": "my-super-secret-password",
"view_count": 1
}'
# Response:
{
"secret_id": "HrVfOn1aoqKHeRKi",
"passphrase": "iT95_B9p9PSMcP-hH9OGS81w9FZVTEpf"
}curl -X POST https://your-domain/decrypt \
-H "Content-Type: application/json" \
-d '{
"secret_id": "HrVfOn1aoqKHeRKi",
"passphrase": "iT95_B9p9PSMcP-hH9OGS81w9FZVTEpf"
}'
# Response:
{
"data": "my-super-secret-password"
}curl -X POST https://your-domain/encrypt_file \
-F "file=@/path/to/secret.pdf;type=application/pdf"
# Response:
{
"secret_id": "97tfNQQBAl0w2zNE",
"passphrase": "CPIX4PeLALaLaNLVFM~oNjM!N&bjZ377"
}curl -OJ -X POST https://your-domain/decrypt \
-H "Content-Type: application/json" \
-d '{
"secret_id": "97tfNQQBAl0w2zNE",
"passphrase": "CPIX4PeLALaLaNLVFM~oNjM!N&bjZ377"
}'
# File will be downloaded with original filenameSΒ³ implements defense-in-depth security:
- Algorithm: Advanced Encryption Standard with 256-bit keys
- Mode: Galois/Counter Mode for authenticated encryption
- Benefits: Provides confidentiality, integrity, and authenticity in a single operation
- Performance: Parallelizable for high-speed encryption/decryption
- Purpose: Converts passphrases into encryption keys
- Design: Memory-hard function resistant to ASIC/GPU attacks
- Parameters: Tuned for 100ms+ derivation time on modern hardware
- Protection: Makes brute-force attacks economically infeasible
- Source:
/dev/urandomvia Go'scrypto/rand - Usage: Secret IDs, passphrases, salts, and nonces
- Entropy: Cryptographically secure for all security operations
- Transport Security: Always use HTTPS in production
- Secret Limits: Set appropriate view counts for your use case
- Passphrase Storage: Never log or persist passphrases
- Infrastructure: Use private subnets for backend services
- Monitoring: Enable CloudTrail/Cloud Audit Logs for access tracking
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Clients ββββββΆβ Load ββββββΆβ SΒ³ β
βββββββββββββββ β Balancer β β Instances β
βββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ
β Storage β
β (AWS/GCP) β
βββββββββββββββ
server {
listen 443 ssl http2;
server_name secrets.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
# Modern SSL configuration
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
# Security headers
add_header Strict-Transport-Security "max-age=63072000" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Go and Echo Framework
- Encryption powered by Go's crypto package
- Cloud storage via AWS SDK and Google Cloud SDK
- UI components from Bootstrap
Made with β€οΈ for keeping secrets secret
Remember: Once viewed, secrets are gone forever! π₯