晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 sh-3ll

HOME


sh-3ll 1.0
DIR:/proc/self/root/lib/dracut/modules.d/97masterkey/
Upload File :
Current File : //proc/self/root/lib/dracut/modules.d/97masterkey/README
# Directions for creating the kernel master key that will be used for
# encrypting/decrypting other keys.

# A trusted key is a TPM random number, which is only ever exposed to
# userspace as an encrypted datablob. A trusted key can be sealed to a
# set of PCR values. For more details on trusted keys, refer to the
# kernel keys-trusted-encrypted.txt documentation.
$ keyctl add trusted kmk-trusted "new 32" @u
801713097

# For those systems which don't have a TPM, but want to experiment with
# encrypted keys, create a user key of 32 random bytes. Unlike
# trusted/encrypted keys, user type key data is visible to userspace.
$ keyctl add user kmk-user "`dd if=/dev/urandom bs=1 count=32 2>/dev/null`" @u
144468621

# Save the kernel master key (trusted type):
$ su -c 'keyctl pipe `keyctl search @u trusted kmk-trusted` > /etc/keys/kmk-trusted.blob'

# or (user type):
$ su -c 'keyctl pipe `keyctl search @u user kmk-user` > /etc/keys/kmk-user.blob'

# A useful feature of trusted keys is that it is possible to prevent their
# unsealing at later time by providing the parameter 'pcrlock=<pcrnum>' when
# loading it, which causes the PCR #<pcrnum> to be extended with a random value.
# Actually, the <pcrnum> variable is set to '11' to let users experiment with
# this feature by using a register that is never extended during the boot,
# making the re-sealing not necessary. In the future, the kernel master key will
# be sealed to the PCR #14 which is extended, according to the TrustedGRUB
# documentation[1], to the measure of the kernel and the initial ramdisk.

# The kernel master key path name and type can be set in one of the following
# ways (specified in the order in which variables are overwritten):

1) use default values:
--------------------------------------------------------------------------
MULTIKERNELMODE="NO"
MASTERKEYTYPE="trusted"
MASTERKEY="/etc/keys/kmk-${MASTERKEYTYPE}.blob"
--------------------------------------------------------------------------

2) create the configuration file '/etc/sysconfig/masterkey' to override the
value of one or all variables;

3) specify these parameters in the kernel command line:
- masterkey=</kernel/master/key/path>, to override the MASTERKEY variable;
- masterkeytype=<kernel-master-key-type>, to override the MASTERKEYTYPE variable.

# The variable MULTIKERNELMODE has been introduced to support multi boot
# configurations, where a trusted/user key is tied to a specific kernel and
# initial ramdisk. In this case, setting MULTIKERNELMODE to 'YES' will cause the
# kernel version to be added to the default masterkey path name, so that the
# MASTERKEY variable should not be overridden each time a different kernel is
# chosen. The default value of MASTERKEY will be equal to:
--------------------------------------------------------------------------
MASTERKEY="/etc/keys/kmk-${MASTERKEYTYPE}-$(uname -r).blob"
--------------------------------------------------------------------------

# The masterkey path name also depends on the value of MASTERKEYTYPE, as reported
# in the default values for defined variables. For example, if only MASTERKEYTYPE
# is overridden by setting it to 'user' in the configuration file or from the
# kernel command line, the value of MASTERKEY will be:
--------------------------------------------------------------------------
MASTERKEY="/etc/keys/kmk-user.blob"
--------------------------------------------------------------------------


[1] https://projects.sirrix.com/trac/trustedgrub/