Showing posts with label Encryption. Show all posts
Showing posts with label Encryption. Show all posts

Tuesday, March 8, 2022

How to access Microsoft Management Console in Windows 10 and create Certificate snap-in?

It is not difficult to create a certificate snap-in in Windows 10. Just follow the steps in this step-by-step procedure. The screenshots are self-explanatory but a few comments have been added. You can use a certificate snap-in for the following accounts, Computer Account, My User account, or Service account.

Invoking the Microsoft Management Console.

Just type in MMC in the windows search at the bottom of the desktop and use the Run Command as shown.



Or you can invoke the RUN command and type 'mmc' in it.


Yet another way you may invoke is by typing in 'certmgr.msc' in the Search box as shown.



Adding a snap-in.

In the File menu item choose Add/Remove snap-in as shown.


The Add/Remove snap-in windows get displayed. There are many items you can add as a snap-in. Observe that 'Certificates' is one of the snap-ins you can add. 


Adding the snap-in is easy. Observe the 'ADD' button between the two boxes in the above figure. Highlight Certificate in the left box and click ADD.


A new window opens asking you to choose from 3 of the options for which certificates can be added as shown.




Choosing 'My User Account' brings up this image.


Click 'Finish' adds the Certificate 'Current User'.

Now click OK. The various items related to the certificates of the Current User are displayed as shown.


The current user of this computer has the following certificates as shown.


From here explore for yourself the different items of the current user to learn about them.


Good luck


Sunday, August 20, 2017

How do you decrypt encrypted cypher?

We saw in the previous post how to encrypt using the EncryptByPassPhrase() function.

We will use the same encrypted text and decrypt it using the same PassPhrase used to create it.

We use the reverse function DecryptByPassPhrase() which takes two arguments, the first is the PassPhrase and the second is the encrypted value (cyphertext). The PassPhrase generates the key for decryption.



MSSS2017\ENCRPTPSWD_04.pn

Thursday, August 10, 2017

How do I keep my email addresses and passwords encrypted using SQL Server?

You could keep your email addresses and passwords in SQL Server database table. You could get a free copy of your SQL Server from a Microsoft download site.

While the email addresses can be kept un-encrypted, you may want to keep your passwords in an encrypted column of a table. If want to keep everything encrypted you can do it also.

With this table set up correctly you may need to remember just one phrase which can be of your choosing.

Here are steps to create such a table:

1. Create a table in one of your existing databases. I am creating this table in a database called 'Aloha' which I use for teaching.

Here is the statement to create the table:

USE Aloha
Go
Create Table Encrpt(
emailID int Primary Key not null,
emailAdd nvarchar(25) null,
emailPswd varbinary(250) null
)


This creates the table ENCRPT.

The email password (emailPswd) is stored in a special column(varbinary data type) as shown above.

Now keep a list of emails and the passwords ready to populate the table.

Populate the table you created by inserting values using the following code:

INSERT INTO ENCRPT(emailID, EmailAdd, emailPswd)
values (1, 'hodentek@live.com', EncryptByPassPhrase('Happy birthday to you','xyzpo')),
(2, 'mysorian@gmail.com',EncryptByPassPhrase('Happy birthday to you ','ZZZ12$' )),
(3, 'htek@mysorian.com',EncryptByPassPhrase('Happy birthday to you','$$$11X' ))

I have inserted only three values but you could add more. While the email addresses shown are my real addresses, the passwords are not.

Now when you run a SELECT statement to display all the columns, this is what you see.


Here is a screen shot of all code:


I have used the same PassPhrase for all data, you could have different on, the onus of remembering phrases is on you.

The fourth row was filled using a different PassPhrase ('Happy Anniversary).
Read more here:

https://hodentekmsss.blogspot.com/2017/08/encrypting-email-password-in-sql-server.html

Monday, July 13, 2015

What is needed to encrypt a database in SQL Server 2016 CTP 2.1?

In order to enable encryption for a database you should set the encryption key.

Here is a database (TestEncrypt with three simple columns) which needs to be encrypted and for which no Enccryption key is set.


TestEncryptOptions.png

Change Encryption Enabled from False to True by clicking on the handle.


TestEncryptOptions2.png
Click OK.
You get the following error message:

TestEncryptOptions3.png