iwu78 / binary

Set of binary related image tools to help visualize logic gates and obfuscation and encryption.
Apache License 2.0
0 stars 0 forks source link

Team Review Ticket #1

Open iwu78 opened 11 months ago

iwu78 commented 11 months ago

Group Members: Ian, Srijan, Hayden, Ryan Analytics: https://github.com/iwu78/binary/graphs/contributors Commits: https://github.com/iwu78/binary/commits/main Video: https://drive.google.com/file/d/1ghLJigFjx0HCcfbWqNPND6knnyCCXCrg/view?usp=sharing

Name Runtime Key Commits Analytics
Ian Image Encryption CSS background CSS button Columnar Transposition Encryption Steganography Analytics
Hayden Image AND Colors AND binary switching JS Colors AND Number Processing Analytics
Ryan Colors AND Colors AND Number Processing Colors AND display boxes Colors AND Buttons Analytics
Srijan Steganography Steganography Canvas Steganography Decoder Analytics

Ian Key Commits:

In this project, I worked mainly on the image encryption systems. Our first system uses XOR gates to AND each pixel RGB value with a randomized key. I wrote JS to create a random image using a pseudorandom number generator, and to XOR this random key with the provided image, this is went over more in detail in the video. I also worked on the button and background CSS. While doing this I faced various issues with CSS, such as how the background was below, and not behind the title. The solution was to set the z-index of the background to -100 to place it behind all the other elements. Another issue I faced was the formatting of the file inputs, which wouldn't work with button CSS. The resulting fix was to set the input's display to none, apply the button CSS to the label of the input, then use JS to change the name of the label when a file is uploaded. Overall, this project helped improve my CSS skills and give a better idea of how logic gates work with images.

Hayden Key Commits

commit 1

Issue faced: Pressing the buttons did not update the decimal values of the R, G, and for the colors.

Fix: Create function buttonClicked() to handle the event that user presses button. Add the power of two if it's 0 to 1, and subtraction the button goes from 1 to 0.

Second issue faced: the 2^0 button added/subtracted 2^8

Second Fix: The math function used was not correctly handling this case. Instead of just taking mod 8 of the button number and subtracting it from 8, it should be subtracting button number from 8, taking mod 8, adding 8 in the case it being negative (since mod of a negative number in JS is negative) and take modulo 8 again. This is shown on this line: val.innerHTML = String(parseInt(val.innerHTML) + Math.floor(2**((((8-buttonNumber)%8)+8)%8))); where the value of the decimal number is increased if a button is clicked to go from 0 to 1. A similar solution (- instead of +) was implemented for updating if the button goes from 1 to 0.

commit 2 (Note: the commit name is off because my computer was about to die)

Issue faced: The buttons didn't change the box colors when pressed. console.log() did not work at this point because the CSS broke it somehow.

Fix: Realized that the new variables being created for the R, G, B values of the color box were being parsed as binary when they were in fact just decimal: var r1 = parseInt(document.getElementById("num1").innerHTML, 2);

deleted the , 2 at the end of the parseInt to change into var r1 = parseInt(document.getElementById("num1").innerHTML);

This was a key commit because of simply how hard it was to debug the site without the console.log() utility available for troubleshooting.

These two key commits demonstrate my contribution to the Colors AND portion of the project, including the CSS and JS skills gathered along the way. Without these commits, Colors AND would not be functional at all, it would just be an array of 48 buttons and 3 big black boxes. The Colors AND project is a user-friendly visual representation of binary to decimal conversion as well as a display of RGB colors and represents my learning and usage of jQuery and CSS through the first few weeks of this trimester.

Ryan commits: https://github.com/iwu78/binary/commit/2d80c26aa21b0f5cedd11ae029c3ac9afbdde27e https://github.com/iwu78/binary/commit/660115629d6118d09bc43ed31628c6cf70cf0b87 https://github.com/iwu78/binary/commit/7660910fc2aa15b72f67b670a167be6dd197b7fd#diff-dd58ef4e643b9af2d87948d4ef0d7315879efd72c39d1619cb9ef72f7c7fa105 commit 1. Each of our RGB values was being converted from a binary number to a decimal number in order to create colors of the color boxes, but we stored these values as variable in binary which wouldn't allow our colors to show up (1000000 in binary is 64 which is not a possible number in base 2). By changing the base from 2 to 10 our values were now valid and able to show up on our color boxes. commit 2. Created the final color box for the ANDed color. The RGB values for the ANDed color is the RGB values of the two user-inputted colors ANDed together - using &. Then the final color is shown as a combination of these newly ANDed RGB values. Created and formatted a new colorbox beside the original two to clearly showcase the ANDing (Also caught missing semicolons error that legit stopped the entirety of our code from running) commit 3. Created a css.css file to contain the css required to display our Colors AND project. This includes stuff like background formatting, as well as button formatting. Also added the 48 original buttons needed for this project with 6 sets of 8 buttons for the six RGB values needed. I also made it so that the buttons defaulted at the '0' value and changed to '1' upon each click, essentially allowing the user to choose their own 8-bit binary numbers.

Srijan Key Commits:

In this project, I worked collaboratively alongside Ian to create the steganography and encryption related projects. Throughout the project, Ian and I used a system in which we spent 15-20 minutes at the start of every class brainstorming ideas and possible solutions to problems we faced. One example of this was when we were creating our steganography project. We were facing an issue in which the image being written to the HTML canvas was not being displayed properly. Through these early minutes of every class, we were able to determine that the size of the canvas in which the image was being written to was too small since we were upscaling the image by a factor of 2 to hide data within. Over these past few weeks, I mainly managed the image steganography project. In the future, we aim to add support to different sized images. As of right now, images must be of the same dimensions and if they aren't, the encoded image output will be severely malformed.

Nathaniel633 commented 11 months ago

Individual Review Nathan Obodovski grading Ryan Liu

Individuals Video, Issue(s), Commits(s)

0.87/0.9 He clearly showed extensive work on this shared project, with him adding the "anding" function of the colors. He showed how he was a key player to his team by finishing his stuff in a timely manner. However I would've liked to see maybe a little bit more peer collaboration, having a teammate fix or help you with something, rather than completely carve yourself out a piece and add it to the end. Overall a great project.

RayyanDarugar commented 11 months ago

Team Review Rayyan grading Ian

Team Review ticket containing key Team and individual contributions

Delta760 commented 11 months ago

Individual Review "Grayson Guyot" grading Hayden Chen

Individuals Video, Issue(s), Commits(s)

willbartelt15 commented 11 months ago

Individual Review "Will Bartelt" grading "Hayden Chen"

Individuals Video, Issue(s), Commits(s)

JasonGao76 commented 11 months ago

Individual Review: Jason grading Srijan

Individuals Video, Issue(s), Commits(s)

Average grade: (0.9+0.8+0.9+0.9+0.8)/5=0.86

Explanations:

First checkbox (key contributer)

  • 0.9. This project is wonderfully creative and very impressive, I did not expect to see a project about image steganography and see it done this well. Srijan's part was mainly the decryption part of the steganography, which is half of a major part of the project. Their commits reflect this work on this section and Srijan explained the code wonderfully. Overall, amazing job! Second checkbox (Video)
  • 0.8. I have no issues with the video, and the only reason it is 0.8 is because it didn't particularly stand out to me as above and beyond. It was clear and showcased the project, but I think it could have focused on the code a little more. Third checkbox (Issues)
  • 0.9. Described issue with images clearly and commits reflected fixing the code. I would like to see a little more added on in text, but I think the in-person explanation and description of issues and fix with masking was very sufficient. Fourth checkbox (Key commits and code summary)
  • 0.9. Commit summary, description, and explanation is concise and clear, and the commit reflects the text well. Commits were crucial to project and Srijan explained the code well. One thing I would mention is potentially adding images to this issue as well to clearly point out what lines of code is being talked about. Fifth checkbox (GitHub analytics and consistency)
  • 0.8. GitHub was consistent and had the key commits, and I don't doubt his work at all. However, there were slight complications with some being done on other's computers and a few huge commits than multiple middle-big commits, so tracking progress could be done a little better.
RayyanDarugar commented 11 months ago

Individual Review Rayyan grading Ian

Individuals Video, Issue(s), Commits(s)