|
| 1 | +# 🔐 Verified CRX Signing Guide |
| 2 | + |
| 3 | +This document explains how to sign Chaos Tab for verified CRX uploads to Chrome Web Store. |
| 4 | + |
| 5 | +## 📋 Prerequisites |
| 6 | + |
| 7 | +- OpenSSL installed |
| 8 | +- Google Chrome installed |
| 9 | +- Private key (`privatekey.pem`) - **KEEP THIS SAFE!** |
| 10 | + |
| 11 | +## 🔑 Key Management |
| 12 | + |
| 13 | +### Your Keys |
| 14 | + |
| 15 | +**Private Key:** `privatekey.pem` |
| 16 | +- ⚠️ **NEVER commit to Git** (already in .gitignore) |
| 17 | +- ⚠️ **NEVER share with anyone** |
| 18 | +- ✅ Store in encrypted location |
| 19 | +- ✅ Keep offline backup on USB drive |
| 20 | +- ✅ Store encrypted backup in password manager |
| 21 | + |
| 22 | +**Public Key:** Used for Chrome Web Store verification |
| 23 | +```bash |
| 24 | +openssl rsa -in privatekey.pem -pubout |
| 25 | +``` |
| 26 | + |
| 27 | +### If You Lose the Private Key |
| 28 | + |
| 29 | +❌ **You CANNOT update your extension anymore!** |
| 30 | +- You'll need to publish as a new extension |
| 31 | +- All users and reviews will be lost |
| 32 | +- **BACKUP YOUR KEY IMMEDIATELY** |
| 33 | + |
| 34 | +## 🚀 Signing Process |
| 35 | + |
| 36 | +### Option 1: Use the Script (Recommended) |
| 37 | + |
| 38 | +```bash |
| 39 | +./sign-extension.sh |
| 40 | +``` |
| 41 | + |
| 42 | +This will: |
| 43 | +1. Check for private key |
| 44 | +2. Pack and sign the extension |
| 45 | +3. Create `chaos-tab-v1.0.0.crx` |
| 46 | + |
| 47 | +### Option 2: Manual Signing |
| 48 | + |
| 49 | +```bash |
| 50 | +# On macOS |
| 51 | +/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ |
| 52 | + --pack-extension=. \ |
| 53 | + --pack-extension-key=privatekey.pem |
| 54 | + |
| 55 | +# On Linux |
| 56 | +google-chrome --pack-extension=. --pack-extension-key=privatekey.pem |
| 57 | + |
| 58 | +# On Windows |
| 59 | +"C:\Program Files\Google\Chrome\Application\chrome.exe" ^ |
| 60 | + --pack-extension=. ^ |
| 61 | + --pack-extension-key=privatekey.pem |
| 62 | +``` |
| 63 | + |
| 64 | +## 📤 Upload to Chrome Web Store |
| 65 | + |
| 66 | +### First Time Setup |
| 67 | + |
| 68 | +1. Go to [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole) |
| 69 | +2. Navigate to your extension → **Package** tab |
| 70 | +3. Find **Verified CRX Uploads** section |
| 71 | +4. Click **Opt In** |
| 72 | +5. Paste your public key: |
| 73 | + ```bash |
| 74 | + openssl rsa -in privatekey.pem -pubout |
| 75 | + ``` |
| 76 | +6. Click **Save** |
| 77 | + |
| 78 | +### For Each Update |
| 79 | + |
| 80 | +1. Run `./sign-extension.sh` to create signed CRX |
| 81 | +2. Go to Developer Dashboard |
| 82 | +3. Click **Upload New Package** |
| 83 | +4. Upload the `.crx` file (NOT the `.zip`) |
| 84 | +5. Submit for review |
| 85 | + |
| 86 | +## 🔒 Security Best Practices |
| 87 | + |
| 88 | +### DO: |
| 89 | +- ✅ Keep private key in encrypted storage |
| 90 | +- ✅ Backup to multiple secure locations |
| 91 | +- ✅ Use password manager for backup |
| 92 | +- ✅ Store offline copy on USB drive |
| 93 | +- ✅ Verify .gitignore includes `*.pem` |
| 94 | + |
| 95 | +### DON'T: |
| 96 | +- ❌ Commit to Git/GitHub |
| 97 | +- ❌ Email or message the key |
| 98 | +- ❌ Store in cloud unencrypted |
| 99 | +- ❌ Share with anyone |
| 100 | +- ❌ Store in Google Account |
| 101 | + |
| 102 | +## 🆘 Backup Checklist |
| 103 | + |
| 104 | +Before publishing, ensure you have: |
| 105 | + |
| 106 | +- [ ] Private key backed up in password manager |
| 107 | +- [ ] Private key on encrypted USB drive |
| 108 | +- [ ] Private key in secure cloud storage (encrypted) |
| 109 | +- [ ] Public key saved (can regenerate from private) |
| 110 | +- [ ] Tested signing process works |
| 111 | + |
| 112 | +## 📝 Verification |
| 113 | + |
| 114 | +After opting in, your extension will show: |
| 115 | +- ✅ "Verified" badge on Chrome Web Store |
| 116 | +- ✅ Cryptographic verification of updates |
| 117 | +- ✅ Protection against package tampering |
| 118 | + |
| 119 | +## 🔄 Regenerating Keys (Emergency Only) |
| 120 | + |
| 121 | +If you lose your key, you CANNOT update the existing extension. You must: |
| 122 | + |
| 123 | +1. Create new extension listing |
| 124 | +2. Generate new key pair |
| 125 | +3. Lose all existing users and reviews |
| 126 | +4. Start from scratch |
| 127 | + |
| 128 | +**This is why backup is critical!** |
| 129 | + |
| 130 | +## 📞 Support |
| 131 | + |
| 132 | +If you have issues: |
| 133 | +- Check Chrome version is up to date |
| 134 | +- Verify OpenSSL is installed |
| 135 | +- Ensure private key has correct permissions |
| 136 | +- Contact: abhishek7gg7@gmail.com |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +**Remember: Your private key is irreplaceable. Treat it like a password to your bank account!** |
0 commit comments