Question

Cyber Security 1. You will first create random keys and initialization vectors that you will use...

Cyber Security

1. You will first create random keys and initialization vectors that you will use throughout the lab.

For example, to create an 8 byte random number (hex), you can use the command: openssl rand -hex 8

Create a random 8-byte key and 8-byte IV that you will use for DES operations and a random 16-byte key and 16-byte IV that you will use for AES operations.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

To create a 8 byte DES key, run the following command :

openssl rand -hex 8

To create a 8 bytes IV for DES operations, execute the following command in Openssl :

$secure = false;
$iv = openssl_random_pseudo_bytes(8, $secure); 
if ($secure) {
    // Success 
} else {
    //Did not Succeed 
}

To create a 16 byte AES key, run the following command :

openssl rand -hex 16

To create a 16 bytes IV for AES operations, execute the following command in Openssl :

$secure = false;
$iv = openssl_random_pseudo_bytes(16, $secure); 
if ($secure) {
    // Success 
} else {
    //Did not Succeed 
}
Add a comment
Know the answer?
Add Answer to:
Cyber Security 1. You will first create random keys and initialization vectors that you will use...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Implement in Go language AES encryption mode CBC with providing the packages name for Go language....

    Implement in Go language AES encryption mode CBC with providing the packages name for Go language. You can implement AES-ECB Mode (the basic AES) from crypto/aes package and crypto/cipher.Block. You can also get the SHA-256 hash function from crypto/sha256. You can get the secure random numbers generator from crypto/rand package. However, the you will implement both CBC mode and HMAC from scratch. You are NOT allowed to use any libraries or packages to implement these two things for you. You...

  • Demonstrate how you can construct an Iterative Hash h function using the Merkle- Damgard Design. Use...

    Demonstrate how you can construct an Iterative Hash h function using the Merkle- Damgard Design. Use as your compression function f:{0, 1}^v times {0, 1}^b rightarrow {0, 1}^v, AES with 512-bit keys. Explain what the values of v and b will be in your compression function and where in the block cipher (AES) are you using the blocks of the message you want to hash. Using the iterative hash function you just create above, show how a digest for a...

  • Write the Code in C program. Create a random password generator that contains a user-specified number...

    Write the Code in C program. Create a random password generator that contains a user-specified number of characters. Your program should prompt the user for the desired length of the password. Length of password: To create your password, use the random number generator in the stdlib.h C library. To generate random numbers, you will need the srand() and rand() functions. srand(seed) is used to "seed" the random number generator with the given integer, seed. Prompt the user for the seed...

  • 1. In this lab, you will create a simple encryption function that will require a sentence...

    1. In this lab, you will create a simple encryption function that will require a sentence and a key (both strings) as a parameter and return an encrypted version of the string. The encryption algorithm will use the exclusive OR operator (commonly abbreviated as XOR). The general structure of the encryption is that every position in the sentence is XOR'd with the accompanying position of the key. If the sentence is longer than the key, you repeat the key. For...

  • 1) Echo the input: First, you should make sure you can write a program and have...

    1) Echo the input: First, you should make sure you can write a program and have it compile and run, take input and give output. So to start you should just echo the input. This means you should prompt the user for the plaintext, read it in and then print it back out, with a message such as "this is the plaintext you entered:". [4 points, for writing a working program, echoing the input and submitting the program on the...

  • 1. Print out information of PHP use phpinfo() function. 2. Write a program that check and...

    1. Print out information of PHP use phpinfo() function. 2. Write a program that check and print odd / even numbers (from number 1 to 100 using for/while loop). Display the results within an HTML table with 2 columns as shown below: NUMBERS RESULTS 1 ODD 2 EVEN 3 ODD HINT: use <table> tags to create a table, <th> tags for ‘Numbers’ and ‘Results’. Wrap code PHP inside HTML code. For example: ​<html> ​​<title>CHECK ODD or EVEN</title> ​​<body> ​​​<table> ​​​​<?php...

  • Learning Objectives: Learn to define constraints on tables Lean to define primary keys and foreign keys...

    Learning Objectives: Learn to define constraints on tables Lean to define primary keys and foreign keys Exercise                                                                                In Lab 09, we will continue the practice of creating tables. You will need to write SQL statements for the tasks specified below. After you complete them, submit your SQL script (in one *.sql file) to Blackboard by 11:59pm Nov. 16 (Friday). Include your name as a comment in the SQL script submitted. The creation statement for each table is worth one point,...

  • Introduction 25 Unit 1 Discussion: Mobile Computing Devices use mobile computing devices throughout the day. Pick one or two typical day(s) for you and create a journal of all the interactions th...

    Introduction 25 Unit 1 Discussion: Mobile Computing Devices use mobile computing devices throughout the day. Pick one or two typical day(s) for you and create a journal of all the interactions that you have with mobile computers. You may get a friend or family member to help, too. For example, smart phone, iPad, GPS, smart watch, automobile computers, etc., are just a few examples. Discussion Responses Discuss a minimum of three mobile computer devices that you used or came in...

  • Questions 1. How to create a comment in python? 2. The way to obtain user input...

    Questions 1. How to create a comment in python? 2. The way to obtain user input from command line 3. List standard mathematical operators in python and explain them 4. List comparison operators in python 5. Explain while loop. Give example 6. Explain for loop. Give example 7. How to create infinite loop? And how to stop it? 8. Explain a built-in function ‘range’ for ‘for’ loop 9. Explain break statement 10. Explain continue statement 11. Explain pass statement 12....

  • package hw3; import java.util.LinkedList; /* *********************************************************************** * A simple BST with int keys and no values...

    package hw3; import java.util.LinkedList; /* *********************************************************************** * A simple BST with int keys and no values * * Complete each function below. * Write each function as a separate recursive definition (do not use more than one helper per function). * Depth of root==0. * Height of leaf==0. * Size of empty tree==0. * Height of empty tree=-1. * * TODO: complete the functions in this file. * DO NOT change the Node class. * DO NOT change the name...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT