Connecting the world, one SMS at a time.
RelaySMS (also known as swob, short for SMSWithoutBorders) is a tool that lets you send secure online messages via SMS without needing an internet connection. RelaySMS allows you to stay connected even when offline by securely storing OAuth2 tokens for services like Gmail, Twitter, and Telegram in encrypted online Vaults.
Gateway Clients
RelaySMS utilizes gateway clients (identified by their MSISDN) to route SMS messages. You can manage these gateway clients within the app, allowing you to add new clients or switch between existing ones. To learn more about gateway clients and how they work, refer to the following resources:
RelaySMS employs robust encryption methods to protect your data and ensure secure communication. For a detailed explanation of the cryptographic methods used in the vault, please refer to the security documentation.
AES (Advanced Encryption Standard): Encrypts and decrypts data at rest in the vault.
Fernet Encryption: Fernet encryption with a 32-byte key is used for encrypting and decrypting identity tokens used by the vault.
HMAC (Hash-based Message Authentication Code): Generates and verifies HMACs for unique values in the vault.
Double Ratchet Algorithm: The Double Ratchet algorithm is used to provide End-to-Vault encryption with perfect forward secrecy for secure messaging.
These cryptographic methods work together to provide a layered security approach, safeguarding your data and communications within the RelaySMS ecosystem.
RelaySMS utilizes a secure vault to store OAuth2 tokens for various services. These tokens allow you to access your accounts and send messages through these services without repeatedly entering your credentials.
Here's how the vault works:
Token Encryption: When you grant RelaySMS access to a platform (e.g., Gmail), the app receives an OAuth2 token. This token is immediately encrypted using AES-256 with a unique key.
Vault Storage: The encrypted token is then stored in the RelaySMS vault. The vault itself is protected by various security measures, including access controls and encryption. You can learn more about the vault specifications in the documentation.
Token Retrieval: When you need to send a message through a service/platform, RelaySMS retrieves the encrypted token from the vault. It then decrypts the token and uses it to authenticate with the platform (e.g Gmail).
This secure token storage and retrieval process ensures that your sensitive credentials are never stored in plain text and are protected from unauthorized access.
You can install RelaySMS directly from the following sources:
git clone https://github.com/smswithoutborders/SMSWithoutBorders-App-Android.git
release.properties
file in the project's root directory (refer to release.properties.example
for a template).We welcome contributions from the community! Here's how you can get involved:
dev
branch for your feature or bug fix.dev
branchPlease ensure your code follows our coding style guidelines and includes appropriate tests.
RelaySMS uses a specific payload structure for publishing messages. Refer to the code snippet below for details on packing and unpacking the payload:
import struct
import base64
platform_letter = b'g'
encrypted_content=b'...'
device_id=b'...'
payload = struct.pack("<i", len(encrypted_content)) + pl + encrypted_content + device_id
incoming_payload = base64.b64encode(payload)
# unpacking in Python
payload = base64.b64decode(incoming_payload)
len_enc_content = struct.unpack("<i", payload[:4])[0]
platform_letter = chr(payload[4])
encrypted_content = payload[5 : 5 + len_enc_content]
device_id = payload[5 + len_enc_content :]
# getting header from published messages
encrypted_payload = base64.b64decode(encrypted_content)
len_header = struct.unpack("<i", encrypted_payload[0:4])[0]
header = encrypted_payload[4: 4 + len_header]
content_ciphertext = encrypted_payload[4 + len_header:]
RelaySMS supports publishing encrypted content to various platforms with specific formatting:
""" Email (Gmail etc)
"""
# to:cc:bcc:subject:body
""" Messages (Telegram etc)
"""
# to:body
""" Text (X; Twitter etc)
"""
# body
We appreciate your interest in RelaySMS. Don't forget star this repo :)