Skip to content

Wromo/NGB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NGB

Next Generation Blockchain Global Coin Network

e.g. COIN = BETACOIN

Certificate Authority (CA) + Directed Acyclic Graph (DAG), is more efficient than blockchain.


A major problem of traditional blockchains such as Bitcoin: excessive energy consumption. Using digital certificates to represent units of value (coins) is an efficient and sustainable solution that can completely eliminate the need for consensus mechanisms such as Proof of Work (PoW). :

1. The Foundation: Digital Certificates Instead of Blockchain

Instead of traditional mining-based mechanisms, the system works like this:

  • Digital Certificates: Each coin e.g. (BETACOIN) is represented by a unique digital certificate generated by a central certificate authority (CA).
  • Private and public keys: The private key of the certificate represents the effective ownership of the coin. The public key is used to verify transactions.
  • Coin Transfer: Transferring a coin involves changing the owner of the digital certificate through a simple and secure cryptographic process.

**2. Key advantages of the system **

a. Energy efficiency:

  • There are no "miners" or energy-intensive consensus algorithms (such as PoW).
  • The generation and transfer of digital certificates requires minimal resources (only standard cryptography, such as RSA or ECDSA digital signatures).
  • The system works with a traditional infrastructure (servers, centralized or distributed databases), without the need for a massive distributed network.

b. Security:

  • The digital certificate is cryptographically validated by the issuing authority (CA).
  • The transfer of private keys can be additionally secured (e.g. encryption or biometric authentication).
  • The system is resistant to 51% attacks, as it does not use distributed consensus.

c. Simplicity:

  • It is easier to implement and understand compared to traditional blockchains.
  • Transactions are fast, as they do not require validation by multiple nodes in a global network.

3. How does certificate-based BETACOIN work?

a. Coin creation (issuance):

  1. Central Authority (CA): Creates a digital certificate for each coin e.g. BETACOIN.
  • Each certificate contains:
  • A unique identifier (e.g. a cryptographic hash or serial number).
  • A public key (publicKey) and a private key (privateKey).
  • Metadata (issue date, issuer, etc.).
  • The certificate is digitally signed by the CA for validation.
  1. Ownership: The holder of the private key associated with a certificate is considered the owner of the coin.

b. Coin transfer:

  1. Issuance of a transfer:
  • The owner digitally signs a transaction using the private key of the certificate.
  • The transaction includes:
  • The certificate identifier.
  • The public key of the recipient (new owner).
  • The digital signature for validation.
  1. Transfer Validation:
  • The recipient can verify the sender's digital signature using the certificate's public key.
  • Once verified, ownership of the coin is transferred.
  1. Ledger (optional):
  • The system can maintain a centralized (or distributed) ledger that stores information about the current owners of the coins.
  • The ledger is updated with each transfer.

c. System Securing:

  1. Strong Authentication: The owner can use biometric or hardware authentication (e.g. YubiKey) to protect their private key.
  2. Encryption: Private keys can be encrypted and transferred in a protected form.
  3. Recovery: The system can allow for the recovery of lost private keys through an identity-based authentication mechanism (similar to password reset).

4. Practical Applications for e.g. BETACOIN

a. Digital Wallet:

  • Users can manage their private keys and BETACOIN certificate through a simple application.
  • The wallet can be connected to a global ledger for transaction validation.

b. Real Payment Integration:

  • Stripe, PayPal or other payment systems can be used to convert e.g. BETACOIN into real money.
  • Each e.g. BETACOIN can be associated with a fixed value (e.g. 1 BETACOIN = 1 Euro), backed by funds in real accounts.

c. Exchanges:

  • BETACOIN can be listed on exchanges for trading.
  • Transaction fees can be managed directly by the application.

5. Alternatives to increase security and efficiency

a. "Smart Certificates" instead of simple private keys:

  • The certificate can include programmable rules for the transfer (e.g. transfer limits, waiting times).
  • Similar to smart contracts, but simpler and without the need for a blockchain.

b. Biometric Integration:

  • Instead of using a traditional private key, the user can unlock the certificate through biometric authentication (fingerprint, face, iris).

c. Lightweight Distributed Ledger (DAG or L2):

  • Instead of maintaining a fully centralized ledger, can use a simple, distributed ledger based on Directed Acyclic Graph (DAG), which is more efficient than blockchain.


Detailed guide to the implementation and complete architecture of the BETACOIN system based on digital certificates:


General architecture

Main components:

  1. Certificate Authority (CA):
  • The central system that generates BETACOIN certificates.
  • Ensures the uniqueness of each certificate and digitally signs each issued coin.
  • Maintains a database of public keys and issued certificates (optional).
  1. Digital wallet (Wallet):
  • Application for users that manages the private keys of BETACOIN certificates.
  • Allows the transfer of certificates between users.
  • Integrates authentication (biometric, hardware or software) for security.
  1. Global registry (Ledger):
  • Optional: Keeps records of all certificates and transactions.
  • Can be centralized (a database managed by the CA) or distributed (using DAG or another model).
  1. API and Web App:
  • An interface for managing and verifying certificates (e.g. to check if a certificate is valid or to transact online).
  • API for integration with other applications (e.g. currency exchange, transfers).

Technical steps for implementation

1. Configuring the Certificate Authority (CA)

a. Generating the CA key and certificate

  1. Install a cryptographic tool such as OpenSSL.
  2. Generate the CA private key:
openssl genrsa -out betacoin_ca.key 2048
  1. Create the public certificate for the CA:
openssl req -x509 -new -nodes -key betacoin_ca.key -sha256 -days 3650 -out betacoin_ca.crt
  • Here you specify the CA details (name, organization, etc.).

b. Generating BETACOIN certificates

  1. Create a script to automate certificate generation:
openssl genrsa -out betacoin_<serial>.key 2048
openssl req -new -key betacoin_<serial>.key -out betacoin_<serial>.csr
openssl x509 -req -in betacoin_<serial>.csr -CA betacoin_ca.crt -CAkey betacoin_ca.key -CAcreateserial -out betacoin_<serial>.crt -days 365 -sha256
  • Each BETACOIN certificate is assigned a unique identifier <serial>.

c. Database Management

  • Create a database (e.g. SQLite, MySQL) to store:
  • Public keys of the certificates.
  • Metadata of the certificates (e.g. expiration dates, current holder).

2. Digital wallet development (Wallet)

a. Basic Features:

  1. Private Key Generation: Allows users to generate and manage private keys for BETACOIN.
  2. Secure Local Storage:
  • Store private keys in encrypted files or secure databases.
  • Examples:
  • Mobile Wallets: Use Keychain on iOS or Keystore on Android.
  • Desktop Wallets: Store keys in AES encrypted files.

b. Coin transfer:

  1. The certificate owner signs the transaction with the private key:
from cryptography.hazmat.primitives.asymmetric import rsa, padding
from cryptography.hazmat.primitives import hashes

signature = private_key.sign(
data_to_transfer,
padding.PSS(
mgf=padding.MGF1(hashes.SHA256()),
salt_length=padding.PSS.MAX_LENGTH
),
hashes.SHA256()
)
  1. The recipient verifies the signature using the public key:
public_key.verify(
signature,
data_to_transfer,
padding.PSS(
mgf=padding.MGF1(hashes.SHA256()),
salt_length=padding.PSS.MAX_LENGTH
),
hashes.SHA256()
)

3. Global registry

a. Centralized Database

  1. Create a registry to store information about coins and transactions:
CREATE TABLE transactions (
id INT AUTO_INCREMENT PRIMARY KEY,
certificate_id VARCHAR(255) NOT NULL,
owner_public_key TEXT NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
);
  1. Update the coin owner for each transaction:
UPDATE transactions SET owner_public_key = 'new_key' WHERE certificate_id = 'cert_id';

b. Alternative: DAG (Directed Acyclic Graph)

  • Uses distributed data structures to record transactions without a centralized database.
  • Examples of libraries:
  • IOTA Tangle for managing transactions in distributed networks.

4. API and web application development

a. Backend API

  1. Essential Endpoints:
  • /create_certificate: Create new certificate.
  • /transfer: Transfer certificate to a new user.
  • /verify: Validate certificate and transactions.
  • /balance: Check BETACOINS held.
  1. Flask (Python) Examples:
from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route('/create_certificate', methods=['POST'])
def create_certificate():
    # Cod pentru generarea unui certificat
    return jsonify({"status": "success", "certificate_id": "12345"})

@app.route('/verify', methods=['GET'])
def verify():
    # Cod pentru validarea unui certificat
    return jsonify({"status": "valid"})

5. Stripe Integration for Conversions

a. Create Stripe account

  1. Set up a Stripe account and generate API keys.
  2. Integrate payments in the app:
import stripe
stripe.api_key = "stripe_api_key"

payment_intent = stripe.PaymentIntent.create(
    amount=1000,  # suma în cenți
    currency='eur',
    payment_method_types=['card']
)

b. Exchange management

  • Stores the total real money value for each BETACOIN.

  • Allows users to sell and buy BETACOIN directly through the Stripe API.


This architecture enables a sustainable, secure and efficient system for managing a certificate-based digital currency. The main advantages are:

  1. Energy efficiency: Eliminating mining.
  2. Security: Use of standard cryptography and a verifiable ledger.
  3. Scalability: You can add new features (e.g. staking, simplified smart contracts).

If you like my vision of the real future for blockchain, you can support it becoming a reality.

LG