C Project Overview
This is a page for the project given to ascol students of C subject in 2021.
Project Details:
The project is about creating a simple Data Encryption Standard(DES). To be a little familiar with DES, you may want to learn about SDES from:
- (pdf) http://mercury.webster.edu/aleshunas/COSC%205130/G-SDES.pdf
- (pdf) http://ict.siit.tu.ac.th/~steven/css322y11s2/unprotected/CSS322Y11S2H01-DES-Examples.pdf
- (implementation) https://toribeiro.com/simplified-DES-implementation-in-C/
The Breaking down of project has not yet been done. This is to be done after feedback from my fellow peers.
Using Git
This project is managed using git. The primary location of git host is: https://codeberg.org/boink/DES
If you don't want to use git, you can directly send the files. email them to ashwin (the at symbol) ashwink.com.np
setting up the worktree
setting up the worktree for git is easy. just type these commands in either a terminal emulator or cmd.exe
git config --global user.name "Name Here" git config --global user.email "email@domain.tld" git clone 'https://codeberg.org/boink/DES' cd DES git checkout -b mybranch
These will setup the name, email and then prepare a new branch for you to work on. Please note that working in a new branch is highly recommended instead of using the master branch directly.
Commiting
If you did the above steps, you're on a new branch called mybranch
.
Do note that you should commit in a sense of completion of small tasks. this makes it easy to revert to certain period of history.
After working, commit your changes with:
git add "file you worked on" "file2" "file3" "etc" git commit
This will ask you for a commit message and a commit body. Put that as asked.
Merging with upstream (Hasta la vista "pull request")
After you've worked on your branch, it'd be nice if we could also look at it. To do that, simply prepare a patch and send an email containing the said patch. These commands create a patch which you can attach as a email attachment to ashwin (the at symbol) ashwink.com.np After sending the patch, I'll update that on the server but in your seperate branch. You can click on the branch link in project homepage to see your branch and commits that you've sent.
You can use this commands to make .patch files which are to be attached in the email body.
git format-patch origin
Do note that git send-email is a lot better but requires some teeny tiny configuration.
Unrelated note (skip to next part)
The reason for using email is because git was made to be used with email. Please note that terrible clients like \(gmail\) are terrible and for better email experience, you should think about using something like Thunderbird. For some informed opinion: https://drewdevault.com/2018/07/02/Email-driven-git.html
Simple project rules
There are some simple rules you need to follow. they are:
- The project should be pure C. It should not depend on an implementation of C. An specific implementation is allowed if and only if it works as expected without that implementation too.
- You cannot copy-paste code from other sources. This should be self explanatory. For an example, do NOT copy a medium article, rename some variables, rearrange some functions and claim you did it yourself. If found, you'll be reported to administration.