FairTest is a cryptographically secure examination platform designed to prevent cheating at all stages of the exam process. It uses advanced cryptographic techniques to ensure exam integrity before, during, and after the examination.
- Pre-Exam Security: AES-256-CBC encryption prevents paper leaks before the exam
- During-Exam Security: Shamir's Secret Sharing algorithm ensures secure access during the exam
- Post-Exam Security: Digital signatures verify the authenticity of results after the exam
- Secure Exam Creation: Create exams with encrypted questions and answers
- Distributed Key Management: Split encryption keys using Shamir's Secret Sharing
- Role-Based Access: Different permissions for students, examiners, and administrators
- Digital Signatures: Cryptographically verify the authenticity of submissions
- Live Results: Real-time display of exam results
- Responsive Design: Works on desktop and mobile devices
- Frontend: React, React Router, Bootstrap
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- Cryptography: AES-256-CBC, Shamir's Secret Sharing, Digital Signatures
FairTest implements a three-layer security architecture:
-
Pre-Exam Security
- Questions and answers are encrypted using AES-256-CBC
- Encryption keys are never stored directly in the database
- Only encrypted content is stored in the database
-
During-Exam Security
- Encryption keys are split into multiple shares using Shamir's Secret Sharing
- A threshold of shares (default: 2) is required to reconstruct the key
- Shares are distributed among trusted authorities
- No single entity can decrypt the exam without collaboration
-
Post-Exam Security
- Student submissions are digitally signed
- Signatures are verified to prevent tampering with results
- Comprehensive audit logging of all security-critical operations
- Node.js (v14+)
- MongoDB
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/fairtest.git cd fairtest -
Install dependencies
npm install cd client npm install cd .. -
Create a
.envfile in the root directory with the following variables:PORT=5001 MONGO_URI=mongodb://localhost:27017/fairtest JWT_SECRET=your_jwt_secret_key NODE_ENV=development -
Run the development server
npm run dev
- Register as an examiner
- Create a new exam with questions and answers
- Set the exam start and end times
- Distribute key shares to trusted authorities
- Publish the exam when ready
- Register as a student
- Log in during the exam period
- Select the active exam
- Answer the questions
- Submit your answers with a digital signature
- Examiners combine key shares to decrypt and grade submissions
- Students can view their results once grading is complete
- Live results show anonymized performance statistics
For maximum security, follow these guidelines:
- Distribute key shares to different trusted authorities
- Never store all key shares in one place
- Ensure each authority understands the importance of securing their share
- Establish a secure protocol for bringing shares together during exam time
For more detailed documentation, see:
- Build Documentation - Detailed explanation of the codebase
- Security Model - In-depth explanation of the security features
- API Documentation - API endpoints and usage
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some 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.
- Shamir's Secret Sharing - The cryptographic algorithm used for key distribution
- AES Encryption - The encryption standard used to secure exam content
- Digital Signatures - The technology used to verify submission authenticity