The new Ph.D. in Advanced Computing program admitted 20 students in fall 2025. The BS in Computer Science and MS in Advanced Computing have the steadfast growth in recent years.
Wednesday, November 5, 2025
Innovation, Integrity and Excellence Happening at Morgan Computer Science.
Tuesday, July 30, 2024
Bell's Theorem - Bell Inequality
Classical computing:
For binary bits measurements:
a0b0 + a0b1 + a1b0 - a1b1 <=2
In quantum mechanics
For using qubits, it can violate the the inequlity:
At Bell state / entanglement
Tuesday, January 30, 2024
AES Algorithm
- Convert to State Array
- Transformations (and inverses)
- AddRoundKey
- SubBytes
- ShiltRows
- MixColumns
- Key Expansion
#AES round key (128 bits)current round key = w0, w1, w2, w3 (column, vertical)w0=column 1, w1 = c.2, w2 = c.3, w3 = c.4g(w3) calculation:
1) shift left, 2) apply s-box,
3) add round constant (01,00,00,00)new roundkey: w4, w5, w6, w7
w4 = w0 xor g(w3), w5 = w4 xor w1,
w6 = w5 xor w2, w7 = w6 xor w3
Example
Sunday, November 14, 2021
AWS Polly - Text to Speech Service
Online service (browser-based)
https://console.aws.amazon.com/polly/home/SynthesizeSpeech
(Log on to aws, go to Polly. Very simple)
Command Line interface (CLI) service
1 Log on to aws and create an IAM user
- add a user with username: administrator with management console access
- create an admin group with admin access policy. add user to the group
- create an access key ID and secret access key
sign in: https://console.aws.amazon.com/iam/
user - security credentials - access keys - create access key
download the key pair file (.csv) to your local computer
- check after installation: c:\> aws --version
- aws configure
copy/paster key id, access key, input default region
aws polly synthesize-speech ^--output-format mp3 ^--voice-id Joanna ^--text "Hello, my name is Joanna. I learned about the W3C on 10/3 of last year." ^hello.mp3hello.mp3
aws polly synthesize-speech^ // load text from a file--output-format mp3 ^--voice-id Brian^--text file://war1.txt ^war1.mp3
aws polly start-speech-synthesis-task ^ //save to S3--engine neural ^--region us-west-2 ^--endpoint-url "https://polly.us-eest-1.amazonaws.com/" ^--output-format mp3 ^--output-s3-bucket-name chris.hare ^--voice-id Joanna ^--text file://war1.txt
With SSML (synthesis markup language), you add tags such as news, conversational, lexicon and add break, emphasis, etc.
Monday, July 19, 2021
Quantum Computing for Beginners
There are three important properties of quantum mechanics:
Superposition, Entanglement, and Interferences
Superposition
For colors, b/w has 2 colors, gif has 256 colors, same as VGA (2^8), SVGA has 2^16=65536 colors, true color (24bit) has 2^24 = 16 million, deep color has 2^30 = 1 billon colors. Now we are using digital computer. The binary system has two numbers 0 and 1. So we are at b/w stage.
For music, bugle has 5 notes (or may be three), march/pop songs/national anthem uses mostly 7 notes, opera/orchestra/Mozart uses 12 notes. As we know, orchestra has more details and rich melody than bugles. You can consider using a digital computer is kind of listening bugle instead of orchestra music.
The superposition property enables quantum computers to represent more information in each unit (qubit) therefore a vast amount of data can be processed in one step.
Entanglement
We know that twin brothers or sisters can somehow "communicate" even though they are physically apart. It seems there is something (or someone) that sends information between each other.
Players in Matching bands synchronize with the conductor. This means, one move, all follows.
The entanglement property "sends" information from one particle to another without delay. It seems there is a super force (God?) to control the particles' rotations with the identical angles along XYZ axes. Once entangled, one can control all qubits by just manipulating one qubit. (The others will follow). It functions like a lever.
Interferences
Throwing two rocks in still water you will see waves and when two waves meet, they add or cancel base on the phases of the waves.
A clock (minute hand) is a good example to explain phases. 12 o'clock is considered phase = 0, at 5 minute phase = 15 (degree), at 15 minute phase = 90. After one hour, the minute hand goes back to phase =0.
---------------
Summary
Entangled qubits have a vast number of different phases (considering distributing on a clock), most of them cancel each other (eg. 5 minute and 35 minute cancel each other). Some add up (remember waves). In the end, a few that with same phase become much larger (fit) than the rest. They are the solutions to the problem.
If you know genetic algorithm or evolutionary computation, it functions similar, same is true comparing to the human evolution. The fit species remain and get better (more fit). Unfit species disappear.
[This explanation uses a form of story teller rather than Einstein level scientific definitions and quantum theory.]
Sunday, February 7, 2021
Forensic Analyzing Memory Image - Bulk-extractor
Bulk_extractor is a program that extracts features such as email addresses, credit card numbers, URLs, and other types of information from digital evidence files. It is a useful forensic investigation tool for many tasks such as malware and intrusion investigations, identity investigations and cyber investigations, as well as analyzing imagery and pass-word cracking.
- Start Kali Linux and download memdump.mem [512 MB]
- Run bulk_extractor -o bulk wordlist memdump.mem. The results will be placed in the "bulk" folder.
- Run cd bulk and then ls -l you will see a list of files
- Use nano to view the files
- nano domain_histogram.txt. You will see domains visited on this computer and the number of times. You can use ctrl+W to search term, eg. ccsf.edu
- ctrl+X to close nano.
- nano ccn_historam.txt You will see the credit card numbers found.
- nano wordlist.txt. You will see the words and the frequency. Useful for cracking encrypted files.
Wednesday, November 25, 2020
Tensor Product
Tensor product is an outer product of two vectors. Here are some examples:
For two qubits:
For three qubits:
In "general",
Saturday, November 14, 2020
Develop a static website on AWS
{
"Id": "Policy1605400973864",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1605400930003",
"Action": "s3:*",
"Effect": "Allow",
"Resource": "arn:aws:s3:::cosc590.bucket",
"Principal": "*"
}
]
}{
"Id": "Policy1605400973864",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1605400930003",
"Action": "s3:*",
"Effect": "Allow",
"Resource": "arn:aws:s3:::cosc590.bucket\*",
"Principal": "*"
}
]
}Monday, September 21, 2020
CNOT Gate
Controlled NOT gate:
⏐x, y⟩ → ⏐x, x ⨂ y⟩
Matrix:
Here ⏐0⟩ == [1 0] and ⏐1⟩ == [0 1] and ⏐ab⟩ = ⏐a⟩ ⨂ ⏐b⟩
Qubit Operation (2)
CNOT gate: to flip iff (if and only if) the control quit is |1>, otherwise it does nothing.
Entanglement:
⏐+⟩ == [1/sqrt (2) * (|0> + |1>) == 0.707 |0> + 0.707 |1>
⏐-⟩ == [1/sqrt (2)] * (|0> - |1>)
X (a, b) = (b, a), NOT gate
|a, b> == |b, a>, see below qubit swap:
Linear Algebra - Qubit Operations
Vectors are commonly written in column format. Sometimes, we also use shorthand format such as (3, 4).
In quantum computing, the state |0> corresponds to vector (1, 0), and |1> corresponds to vector (0, 1).
Commonly used quantum gates, quantum circuit symbols, and math representations:
The Bloch sphere representation of X (NOT), H (Hadamard), and Z, S, T (phase) gates.
- X gate rotates along X axis 180 degree (or less depending on the initial angle to Z axis). (NOT)
- H gate rotates along Y axis 90 degree (or less).
- Z, S, T gates rotate along Z axis at certain degree. (phase)
Monday, September 7, 2020
PGP Encryption
Developed by Phil Zimmerman in 1991. It combines symmetric, asymmetric (public key) encryption, hash, and digital signature all together providing confidentiality, integrity, and authentication. Good for email. The algorithm:
At the sender (Alice) side:
- Alice: Message M is hashed
- Sign (encrypt) the hash value with her private key (EP)
- Compress (zip) the message + signed hash value
- Use a session key Ks to encrypt zipped output (ES)
- Use Bob's public key to encrypt session key (EP)
- Send encrypted message and encrypted session key
- Use Bob's private key to decrypt session key (DP)
- Use session key Ks to decrypt the zipped message
- unzip, got message and signed hash value
- Use Alice's public key to decrypt the hash value
- Computing hash value for the message received
- Compare with hash value Alice computed.
Tuesday, September 1, 2020
Quantum Circuit
A quantum circuit is a computational routine consisting of coherent quantum operations on quantum data, such as qubits, and concurrent real-time classical computation. It is an ordered sequence of quantum gates, measurements, and resets, which may be conditioned on and use data from the real-time classical computation. A set of quantum gates is said to be universal if any unitary transformation of the quantum data can be efficiently approximated arbitrarily well as a sequence of gates in the set. Any quantum program can be represented by a sequence of quantum circuits and non-concurrent classical computation.
A quantum gate is a reversible (unitary) operation applied to one or more qubits.
Electronic computer: program --> instructions (operand and data) - binary bits
Quantum computer: program --> quantum circuits (quantum gate and quantum data) - qubits
Friday, August 28, 2020
Hashcat - Password Cracking
The labs shows how to crack hashed passwords using dictionary and brute-force methods on Kali Linux.
Download hashcat-exercise-files.zip
sudo mkdir hashcat-exercise
unzip hashcat-exercise-files.zip
./view-sample-password.sh
echo -n salt [password] | md5sum
man crypt
man mkpasswd
A: Dictionary attack
Create text file test-dictionary with three words hello, wtaddtsbtk, dog in three lines.
hashcat -m 500 -a 0 crack-these-please-md5 test-dictionary --force (cracked with 3 passwords)
hashcat -m 1800 -a 0 crack-these-please-sha512 test-dictionary (cracked with 3 passwords)
hashcat -m 500 -a 0 crack-these-please-md5 500_passwords.txt (cracked with 7 different)
hashcat -m 1800 -a 0 crack-these-please-sha512 500_passwords.txt (cracked with 7 different)
B: Brute force attack
openssl speed md5
openssl speed sha512
This shows md5 processes more data than sha512 in the same amount of time.
hashcat -m 500 -a 3 crack-these-please-md5 ?l?l (mask ?l means one lowercase letter) return: w, ww
hashcat -m 500 -a 3 crack-these-please-md5 ?a?a (?a all 95 characters on keyboards instead of 26)
Core attack modes
- Dictionary attack - trying all words in a list; also called “straight” mode (attack mode 0, -a 0)
- Combinator attack - concatenating words from multiple wordlists (mode 1)
- Brute-force attack and Mask attack - trying all characters from given charsets, per position (mode 3)
- Hybrid attack - combining wordlists+masks (mode 6) and masks+wordlists (mode 7); can also be done with rules


















