6月 042021
 

1,生成数据文件
说明:文件iot_code.txt中写入了一条36位字符长度的有效IOT编码数据。

[root@localhost ~]# echo "0CN01000000200000000000000000000gzAY" > iot_code.txt
[root@localhost ~]# cat iot_code.txt 
0CN01000000200000000000000000000gzAY
[root@localhost ~]#

2,生成私钥
说明:非对称加密由一组密钥对构成,分别是“私钥”及其对应的“公钥”。“私钥”信息属于机密信息,“公钥”信息可以公开分享给数据交换方。

[root@localhost ~]# openssl genrsa -out private.key
Generating RSA private key, 2048 bit long modulus (2 primes)
....+++++
..................................................+++++
e is 65537 (0x010001)
[root@localhost ~]# cat private.key 
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAltOrRKKvP8wKzq1BTlL2aKjpgM4mRHNWYWSexQBT69wMretq
9xGazVepAuPvZR2MtD3vX4kd3YkziXwJoHwj2DzeGlIlWYhO2v4QnfGZ4sx+9l06
86h7cQQJqzoNrIh8C9St95BMbu4ZlyFHoIHj72wlgLqNgdQLeFuMw7vrt0ZM3aBs
5gFc/7nOOSLD+AcU86fJEiJozxrV6hz8ylVDs+54Sd2ri/K6FejasjatOK9andtU
xV7h1PvnI2GwIcG8va3z3us74oyL/b6GCZmkdrdq44RXD9TVsd3POKFbb+aPAlkg
NINKU8tQJ2QwQLnc/PTsQJLNSE51xZcKefpAbwIDAQABAoIBAQCBGgOyx1Ic2Kmz
iSeqRGc45MSihVLKKrOYwAkK9aHf9MZBpI41l7Ma61r252ZF9go3SgB4lSSkOUmM
+EhBP6Fq+YbfnsrrnTpqRyiwGVqwgHx4owrP/7pR3bPtBc8ojNcpRU3352MVXOc4
rrrhz+zsRnS/gG+Z3ohG6I5QCK3WfJzu4TePHkLJoC8kmHuVGB/NTnHsh6liz1T8
IJXT2C2stCu5mVZOVaQr9AtyEVUCEaES/Lwi15/9QQfDzkXSH2Pi2sE7FlYnaVDN
ERXsnQ/73FaXcxgwNM6SiM77ZO17pfcuMaMGlrF5K4cFGe0zlR9YoCYuXf3CeFv1
5lmrxP4hAoGBAMVyZdfGhPXjXApMyZ0Iw97uFwpNsAP2SNNyndTGDNjhkG8HhZ1i
O4bsBCg+PYREraGCSWErHJ1z3uRvK37v3xDLIZYJ7+lXlWVvav9vNaR/nECvIMiF
x+QLo2IkoE55fb/p0MGhFjKkhqQBL3i/PTA9VFy7ySgt5hf0b4elgcZfAoGBAMOO
Auak7cQFJa5Ah1o2WZKgmv5qOlYDauXS8naMZ1Uw8UfnWNYL+t2QGy3eUpmiRDxc
Z6ytn3t/hklSF1gt4wcPyKxQ8CncNAEVR4FpQoFkRx+Lk5I/fw0iRa6T1Vio3lfj
AN5Hz1FJO3+4cJIT+YKkXfPKaHNO9e8kKKrm1x/xAoGBALb6yHUKbefuFzsYZHOa
TuNHZKTQ0EErudvzSV+JVxibGZ47q1DqW14zVbrxy1LLztlxg42ARZmJa1PpzrZp
mCDZDzwb43EtEK+bbN5h8qWK+YRciBYtHM0zF+v5I3L2VlpHVoZLQeYW4QwWaScO
m6cb/xWdldMdjjI+/ikIcdcjAoGAGVL/ryy2mcbs3UcAAD+/k8x2pfHNwivJISAT
RCTkkNS4uk4MZBPDFgQ+cM80tS6dVY/F4UfOumiGVGJsIYA3wUda/m2w3Erm9Sjz
TJ/7+9Onnj8uCids5Z+FlJkSbNvZh1ofV6nHAEjSirSw50ns6u0sOZEBu8UC9kgh
eBhSzZECgYEAjxZaDN1xm3zct23KcHc7G+x28OKyfanZNv4fV3oxSHDBRHgxJ4CO
Gb/ZVboAwlLTVdGA0fgBeyn9gRCLXzP8Z8Ex4wu5OiLjray9HxkCh8mikBk7PT/m
hsvhibHnX9V+/85Oo/ZS2MOyPcr12PTnHGtMSrNFbOihfvq0+8Z7bgY=
-----END RSA PRIVATE KEY-----
[root@localhost ~]#

3,使用私钥生成公钥
说明:“公钥”经由“私钥”信息经特定加密算法计算而来,每一个“私钥”与“公钥”的密钥对都是唯一组合。

[root@localhost ~]# openssl rsa -pubout -in private.key -out public.key
writing RSA key
[root@localhost ~]# cat public.key 
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAltOrRKKvP8wKzq1BTlL2
aKjpgM4mRHNWYWSexQBT69wMretq9xGazVepAuPvZR2MtD3vX4kd3YkziXwJoHwj
2DzeGlIlWYhO2v4QnfGZ4sx+9l0686h7cQQJqzoNrIh8C9St95BMbu4ZlyFHoIHj
72wlgLqNgdQLeFuMw7vrt0ZM3aBs5gFc/7nOOSLD+AcU86fJEiJozxrV6hz8ylVD
s+54Sd2ri/K6FejasjatOK9andtUxV7h1PvnI2GwIcG8va3z3us74oyL/b6GCZmk
drdq44RXD9TVsd3POKFbb+aPAlkgNINKU8tQJ2QwQLnc/PTsQJLNSE51xZcKefpA
bwIDAQAB
-----END PUBLIC KEY-----
[root@localhost ~]#

4,使用私钥对文件签名
说明:非对称加密算法中,“私钥”用于签名和解密,“公钥”用于加密和验证签名。此示例仅应用了签名和验证签名功能。签名的加密算法和摘要算法是可选的,例如从合规角度选择使用国密算法。

[root@localhost ~]# openssl dgst -md5 -out iot_code.txt.md5.sign \
> -sign private.key iot_code.txt 
[root@localhost ~]# ls
anaconda-ks.cfg iot_code.txt iot_code.txt.md5.sign private.key
[root@localhost ~]#

5,使用hexdump工具查看二进制签名文件(以十六进制显示)
说明:签名成功后,特定工具可以查看签名文件的内容,实际为二进制密文,在没有公钥的情况下,该密文无法解码。

[root@localhost ~]# hexdump iot_code.txt.md5.sign 
0000000 3a82 f857 97b8 bb23 5d43 9902 d398 f6ae
0000010 478e d1a0 4a03 ab62 07e2 794e c81c 71ac
0000020 0903 135e 8c7c b3e0 164b f0d2 5e21 0009
0000030 5623 e252 2b9b ce8c 6e33 2527 b34e cbf5
0000040 9257 b8b9 4c28 5981 7b46 e732 54d3 7fae
0000050 3949 f53c 69fc 8e24 fbb0 53a1 7df4 9278
0000060 fcce a728 01b6 d15c aa91 db52 0700 8b2f
0000070 dda9 14d0 f921 9747 c8c3 70b5 aa29 8045
0000080 4770 97b7 fd31 bb81 c865 0bda 8fd3 4ba8
0000090 e194 3e9c 7de5 9673 bcc9 1150 759f 0317
00000a0 2388 7898 fe8c 1133 4bdc 5337 96e1 0fc7
00000b0 b78f cd46 96e3 d1e4 9947 2a80 c9e9 ac14
00000c0 47df 0f0b c089 9897 dd03 926f 467f b2d3
00000d0 de24 f31c 3c91 d9a8 2e7a 7269 e1ad 2b1e
00000e0 3983 45b1 750b 939e 51b2 428d ef88 75df
00000f0 4e3b 33cb 1eda 11d4 b28d 44e7 82c6 6010
0000100
[root@localhost ~]#

第6步,使用签名者公钥验证签名有效性
说明:为了验证数据及数据签名的有效性(即数据文件和签名文件是否为合法有效的组合),需使用“公钥”信息对签名信息和数据文件进行验证。

[root@localhost ~]# openssl dgst -md5 -verify public.key \
> -signature iot_code.txt.md5.sign iot_code.txt
Verified OK
[root@localhost ~]#

第7步:使用签名者私钥验证签名有效性
说明:签名者自身亦有能力对自己签发的签名信息进行验证,与“公钥”验证不同之处在于,需要使用签名者的“私钥”进行验证。

[root@localhost ~]# openssl dgst -md5 -prverify private.key \
> -signature iot_code.txt.md5.sign iot_code.txt
Verified OK
[root@localhost ~]#

 

6月 012021
 
(10 inches * 128 dpi) * (6 inches * 128 dpi) = 1280 * 768
(8 inches * 128 dpi) * (6 inches * 128 dpi) = 1024 * 768
(10 inches * 128 dpi) * (8 inches * 128 dpi) = 1280 * 1024

What Is DPI and What Are the Requirements for Different Industries?

For businesses investing in printing and scanning resources, it’s important to understand the project requirements. Balancing cost and output, and ensuring the right resources are applied to the requirements, isn’t always easy.

Investing in the wrong technology or services can mean wasted money. Implementing the wrong solution can put your business at risk and leave employees struggling with an inadequate solution.

We’ll look at dots per inch, or DPI, and how businesses can use it to determine the scope and requirements of printing and scanning services. We’ll also look at DPI as a baseline measure for certain industries and requirements, so you can scale and budget your services.

What Is DPI and How Is It Used?

DPI, or dots per inch, is a measure of the resolution of a printed document or digital scan. The higher the dot density, the higher the resolution of the print or scan. Typically, DPI is the measure of the number of dots that can be placed in a line across one inch, or 2.54 centimeters.

The higher the DPI, the sharper the image. A higher resolution image provides the printer and printing device more information. You can get more detail and greater resolution from an image with higher DPI.

A lower DPI will produce an image with fewer dots in printing. No matter how powerful your printer is, a low-resolution image doesn’t provide enough raw data to produce high-quality images. The ink will spread on the page, making the edges look fuzzy.

Similarly, a monitor will measure the pixels per inch, or PPI, of a video display. Typically, a printer must offer a higher DPI to match the color quality and resolution of a video display PPI. This is due to the limited range of colors in a print job.

DPI Printing and Industry Standards

Let’s review a few standards and guidelines for using DPI in printing services. Keep in mind, you’ll need a better, and more capable, printer or print service to deliver higher-quality and high-resolution printing output.

1. Low-Resolution Images

Low-resolution images are considered 150dpi and less. For print, 150dpi is considered low-quality printing, even though 72dpi is considered the standard for the web (which is why it’s not easy printing quality images straight from the web). Low-resolution images will have blurring and pixelation after printing.

For business purposes, low-resolution images are suitable for scanning text documents and storing records digitally. Internal office communication can be reproduced with a low resolution, but anything used outside the office should be higher than 150dpi. After all, the printing quality needs to represent your business.

2. Medium-Resolution Images

Medium-resolution images have between 200dpi-300dpi. The industry standard for quality photographs and image is typically 300dpi.

For businesses, producing an external document like a brochure, a booklet, or a flyer requires 300dpi. You might be able to get away with 250dpi if you are less concerned with the quality and resolution of the printing. Any marketing material or collateral produced should be, at a minimum, 300dpi. Booklets, pamphlets, reports, and sales sheets should all be printed at 250dpi-300dpi or more.

A good rule to follow is when in doubt, select a higher dpi for your material.

3. High-Resolution Images

Most businesses consider 600dpi and higher to be a high-resolution image or print. High-resolution images require more memory to store and can take longer to scan. Storing high-resolution images can quickly fill a hard drive or server. Many desktop printers can’t reproduce high-quality and high-resolution images. Professional print services are often the best solution for high-resolution images.

Keep in mind, there are diminishing returns for increasing the resolution of an image. Any print above 1,200dpi will deliver improvements that are practically unnoticeable to the naked eye. You won’t be able to see any difference between documents. Only professional photographers or artists with highly detailed work will need resolution that high.

Other Factors That Influence Print Quality

DPI isn’t the only factor that determines the resolution and print quality. Often, these other factors can have more impact on quality and resolution.

For example, sometimes users will change the resolution of an image in software like Photoshop. This will increase the DPI, but it won’t change or increase the quality of the image. The pixels in the image are larger, resulting in a pixelated, almost unprintable, image. This is known as upsampling.

The printer, and ink used in the printer, can also affect print output. Laser jet printers use a toner that doesn’t bleed into the paper, producing a crisper image. Inkjet printers will bleed, which can lower the appearance of dots per inch for a printed work.

What Is DPI and What It Means for You

Selecting the right DPI printing services and office technology is important. Dots per inch is one factor that can influence the efficiency and cost of print services. It’s important to identify your business requirements and scanning and printing needs before selecting print services.

What Is DPI and What Are the Requirements for Different Industries? – Donnellon McCarthy (dme.us.com)