1. A method comprises: dividing data into a plurality of data segments; for a data segment of the plurality of data segments: encoding the data segment using a dispersed storage error encoding function to produce a set of encoded data slices; generating slice names for each encoded data slice of the set of encoded data slices to produce a plurality of slice names, wherein a slice name of the plurality of slice names includes a data identifier, a data segment identifier, and an encoded slice identifier; when a subset of encoded data slices of the set of encoded data slices is to be encrypted: generating a master key; selecting a portion of the slice names for the subset of encoded data slices to produce a subset of selected slice name portions; generating a subset of encryption keys based on the master key and the subset of selected slice name portions; encrypting the subset of encoded data slices using the subset of encryption keys to produce a subset of encrypted encoded data slices; outputting the subset of encrypted encoded data slices to a dispersed storage network (DSN) for storage therein; and outputting remaining encoded data slices of the set of encoded data slices to the DSN for storage therein.